public void Awake() { if (Instance != this) { Debug.LogWarning("Multiple instances of ManipulationSystem detected in the scene." + " Only one instance can exist at a time. The duplicate instances" + " will be destroyed."); DestroyImmediate(gameObject); return; } m_ObjectManipulator = (ObjectManipulator)FindObjectOfType(typeof(ObjectManipulator)); DontDestroyOnLoad(gameObject); }
private void Start() { m_ObjectManipulator = (ObjectManipulator)FindObjectOfType(typeof(ObjectManipulator)); }