Код: Выделить всё
public class CameraShake : MonoBehaviour
{
// Make it singleton
#region Singleton
public static CameraShake instance { get; private set; };
private void Awake()
{
if (instance == null)
instance = this;
}
#endregion
public void Function() {// Code here...}
}
Подробнее здесь: https://stackoverflow.com/questions/784 ... ing-called
Мобильная версия