hi,I have this issue in my project when public to wp ,there are no error on other platform
The type or namespace name SingletonMonoBehaviour
1’ could not be found, Are you missing a using directive or an assembly reference?
and my full code like this
using System;
using System.Runtime.CompilerServices;
using UnityEngine;
public class SingletonMonoBehaviour : MonoBehaviour where T : SingletonMonoBehaviour
{
private static SingletonMonoBehaviour<T> uniqueInstance;
public static bool Exists
{
get;
private set;
}
public static T Instance
{
get
{
SingletonMonoBehaviour<T>.Exists;
return (T)SingletonMonoBehaviour<T>.uniqueInstance;
}
}
public SingletonMonoBehaviour()
{
}
protected virtual void Awake()
{
if (SingletonMonoBehaviour<T>.uniqueInstance == null)
{
SingletonMonoBehaviour<T>.uniqueInstance = this;
SingletonMonoBehaviour<T>.Exists = true;
}
else if (SingletonMonoBehaviour<T>.uniqueInstance != this)
{
throw new InvalidOperationException(string.Concat("Cannot have two instances of a SingletonMonoBehaviour : ", typeof(T).ToString(), "."));
}
}
protected virtual void OnDestroy()
{
if (SingletonMonoBehaviour<T>.uniqueInstance == this)
{
SingletonMonoBehaviour<T>.Exists = false;
SingletonMonoBehaviour<T>.uniqueInstance = null;
}
}
}
public class EasySingleton : SingletonMonoBehaviour
{
}
can somebody show me how to fixed this issue?