public void Start() { DontDestroyOnLoad(this.gameObject); SFMgr = new SFManager(InitParams); if (SFMgr.IsSFInitialized()) { GamePad = new SFGamepad(SFMgr); GamePad.Init(); //SFMgr.InstallDelegates(); InitParams.Print(); #if UNITY_STANDALONE_WIN || UNITY_STANDALONE_OSX || UNITY_EDITOR GL.IssuePluginEvent(0); #elif UNITY_IPHONE || UNITY_ANDROID UnityRenderEvent(0); #endif GL.InvalidateState(); } // Figure out if gamepad is connected. GamepadConnected = false; if (Input.GetJoystickNames().Length != 0) { GamepadConnected = true; } }
/// <summary> /// During the Start function, the Scaleform Manager and internal Scaleform runtime is initialized, Gamepad is created and initialized. /// </summary> /// <returns></returns> public IEnumerator Start() { // DontDestroyOnLoad(this.gameObject); SFMgr = new SFManager(InitParams); if (SFMgr.IsSFInitialized()) { GamePad = new SFGamepad(SFMgr); GamePad.Init(); //SFMgr.InstallDelegates(); InitParams.Print(); SFMgr.SetNewViewport(0, 0, Screen.width, Screen.height); #if UNITY_STANDALONE || UNITY_EDITOR || UNITY_METRO GL.IssuePluginEvent(0); #elif UNITY_IPHONE || UNITY_ANDROID UnityRenderEvent(0); #endif GL.InvalidateState(); // Figure out if gamepad is connected. GamepadConnected = false; #if !UNITY_WP8 if (Input.GetJoystickNames().Length != 0) { GamepadConnected = true; } #endif if (WhenToRender == RenderTime.EndOfFrame) { yield return StartCoroutine("CallPluginAtEndOfFrame"); } } }
public void Start() { DontDestroyOnLoad(this.gameObject); SFMgr = new SFManager(InitParams); if (SFMgr.IsSFInitialized()) { GamePad = new SFGamepad(SFMgr); GamePad.Init(); //SFMgr.InstallDelegates(); InitParams.Print(); #if UNITY_STANDALONE_WIN || UNITY_STANDALONE_OSX || UNITY_EDITOR GL.IssuePluginEvent(0); #elif UNITY_IPHONE || UNITY_ANDROID UnityRenderEvent(0); #endif GL.InvalidateState(); } // Figure out if gamepad is connected. GamepadConnected = false; if (Input.GetJoystickNames().Length != 0) { GamepadConnected = true; } }