You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Bridge in Unity cannot be derived from MonoBehaviour as the data necessary for constructing Paths is not allowed in the Start method. A more safe way is to add a MonoBehaviour property and assign it using a separate constructor. Like:
private MonoBehaviour behaviour
{
get;
set;
}
/// <summary>
/// Initializes a new instance of the asset_proof_of_concept_demo_CSharp.Bridge class.
/// </summary>
public Bridge()
{
if (!Directory.Exists(StorageDir))
{
Directory.CreateDirectory(StorageDir);
}
}
public Bridge(MonoBehaviour behaviour) : this()
{
this.behaviour = behaviour;
}