// -- Sprオブジェクトの構築を行う public override ObjectIf Build() { SEH_Exception.init(); PHSceneIf phScene; if (enableDebugWindow) { fwApp = new FWApp(); fwApp.InitInNewThread(); // FWAppの初期化が終わるまで待つ while (fwApp.GetSdk() == null || fwApp.GetSdk().GetPHSdk() == null) { System.Threading.Thread.Sleep(10); } phSdk = fwApp.GetSdk().GetPHSdk(); phScene = fwApp.GetSdk().GetScene(0).GetPHScene(); phScene.Clear(); phScene.SetDesc((PHSceneDesc)desc); FWSceneIf fwSceneIf = fwApp.GetSdk().GetScene(0); fwSceneIf.EnableRenderContact(true); fwSceneIf.EnableRenderForce(false, true); //fwSceneIf.SetForceScale(0.01f, 0.01f); } else { phSdk = PHSdkIf.CreateSdk(); phScene = phSdk.CreateScene((PHSceneDesc)desc); } return(phScene); }
// ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- // MonoBehaviourのメソッド void Awake() { if (!enabled) { return; } if (app == null) { app = new FWApp(); app.CreateSdk(); FWSceneIf fwScene = app.GetSdk().CreateScene(new PHSceneDesc(), new GRSceneDesc()); fwScene.SetRenderMode(true, true); fwScene.EnableRenderPHScene(true); fwScene.EnableRenderForce(true, true); GRDeviceIf device = app.GRInit(); FWWinIf nullwin = new FWWinIf(); nullwin._this = (System.IntPtr) 0; FWWinIf win = app.CreateWin(new FWWinDesc(), nullwin); mainloop = new Thread(new ThreadStart(MainLoop)); mainloop.Start(); } }