//public void Start() //{ //} /// <summary> /// During the Start function, the Scaleform Manager and internal Scaleform runtime is initialized, Gamepad is created and initialized. /// </summary> /// <returns></returns> public void SFAwake() { ShiftKeyDown = false; ControlKeyDown = false; AltKeyDown = false; // DontDestroyOnLoad(this.gameObject); SFMgr = gameObject.AddComponent<SFManager>(); SFMgr.Init(InitParams); if (SFMgr.IsSFInitialized()) { GamePad = new SFGamepad(SFMgr); GamePad.Init(); //SFMgr.InstallDelegates(); InitParams.Print(); SFMgr.SetNewViewport(0, 0, Screen.width, Screen.height); // Figure out if gamepad is connected. GamepadConnected = false; #if !UNITY_WP8 if (InputManager.GetJoystickNames().Length != 0) { GamepadConnected = true; } #endif } }
protected void Start() { if (Application.isPlaying) { DontDestroyOnLoad(gameObject); SFMgr = new SFManager(InitParams); SFMgr.Init(); // SFMgr.InstallDelegates(); GL.IssuePluginEvent(0); GL.InvalidateState(); Movie = new ScaleformMovie(SFMgr, createMovieCreationParams(FlashMovieFile)); StartCoroutine(CallPluginAtEndOfFrames()); } }