// Use this for initialization void Start() { SMPtr = Camera.main.GetComponent <SceneManager>().ScriptMaster; SMPtr.RegisterCustomFunction(new M22.CustomFunctions.DrawSprite()); SMPtr.RegisterCustomFunction(new M22.CustomFunctions.HeartThrob()); SMPtr.RegisterCustomFunction(new M22.CustomFunctions.SakuraEffect()); SMPtr.RegisterCustomFunction(new M22.CustomFunctions.SnowEffect()); SMPtr.RegisterCustomFunction(new M22.CustomFunctions.WrittenNote()); SMPtr.RegisterCustomFunction(new M22.CustomFunctions.HospitalMask()); M22.ScriptCompiler.InitializeCustomFunctions(); SMPtr.LoadScript("START_SCRIPT"); if (DebugDisplayPrefab == null) { DebugDisplayPrefab = Resources.Load <GameObject>("Prefabs/DebugDisplay") as GameObject; if (DebugDisplayPrefab != null) { GameObject.Instantiate <GameObject>(DebugDisplayPrefab, Camera.main.transform); } } else { GameObject.Instantiate <GameObject>(DebugDisplayPrefab, Camera.main.transform); } }
// Use this for initialization void Start() { SMPtr = Camera.main.GetComponent <ScriptMaster>(); SMPtr.LoadScript("START_SCRIPT"); if (DebugMode == true) { GameObject debugPrefab = Resources.Load <GameObject>("Prefabs/DebugDisplay") as GameObject; if (debugPrefab != null) { GameObject.Instantiate <GameObject>(debugPrefab, Camera.main.transform); } } }