Skip to content

Commit

Permalink
Move CEF message loop to FixedUpdate
Browse files Browse the repository at this point in the history
  • Loading branch information
vberezkin committed Mar 14, 2019
1 parent 233d5c6 commit 8d11a1c
Show file tree
Hide file tree
Showing 20 changed files with 1,558 additions and 307 deletions.
13 changes: 4 additions & 9 deletions Assets/Resources/Expload/OffscreenCEF.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ private void Awake()
private void Start()
{
this.StartCef();
this.StartCoroutine(this.MessagePump());
DontDestroyOnLoad(this.gameObject.transform.root.gameObject);
}

Expand Down Expand Up @@ -102,16 +101,12 @@ private void Quit()
CefRuntime.Shutdown();
}

private IEnumerator MessagePump()
void FixedUpdate()
{
while (!this.shouldQuit)
CefRuntime.DoMessageLoopWork();
if (!this.shouldQuit)
{
CefRuntime.DoMessageLoopWork();
if (!this.shouldQuit)
{
this.cefClient.UpdateTexture(this.BrowserTexture);
}
yield return null;
this.cefClient.UpdateTexture(this.BrowserTexture);
}
}

Expand Down
298 changes: 0 additions & 298 deletions Assets/Scenes/SampleScene.unity

This file was deleted.

40 changes: 40 additions & 0 deletions Packages/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"dependencies": {
"com.unity.ads": "2.0.8",
"com.unity.analytics": "3.2.2",
"com.unity.collab-proxy": "1.2.15",
"com.unity.package-manager-ui": "2.0.3",
"com.unity.purchasing": "2.0.3",
"com.unity.textmeshpro": "1.3.0",
"com.unity.modules.ai": "1.0.0",
"com.unity.modules.animation": "1.0.0",
"com.unity.modules.assetbundle": "1.0.0",
"com.unity.modules.audio": "1.0.0",
"com.unity.modules.cloth": "1.0.0",
"com.unity.modules.director": "1.0.0",
"com.unity.modules.imageconversion": "1.0.0",
"com.unity.modules.imgui": "1.0.0",
"com.unity.modules.jsonserialize": "1.0.0",
"com.unity.modules.particlesystem": "1.0.0",
"com.unity.modules.physics": "1.0.0",
"com.unity.modules.physics2d": "1.0.0",
"com.unity.modules.screencapture": "1.0.0",
"com.unity.modules.terrain": "1.0.0",
"com.unity.modules.terrainphysics": "1.0.0",
"com.unity.modules.tilemap": "1.0.0",
"com.unity.modules.ui": "1.0.0",
"com.unity.modules.uielements": "1.0.0",
"com.unity.modules.umbra": "1.0.0",
"com.unity.modules.unityanalytics": "1.0.0",
"com.unity.modules.unitywebrequest": "1.0.0",
"com.unity.modules.unitywebrequestassetbundle": "1.0.0",
"com.unity.modules.unitywebrequestaudio": "1.0.0",
"com.unity.modules.unitywebrequesttexture": "1.0.0",
"com.unity.modules.unitywebrequestwww": "1.0.0",
"com.unity.modules.vehicles": "1.0.0",
"com.unity.modules.video": "1.0.0",
"com.unity.modules.vr": "1.0.0",
"com.unity.modules.wind": "1.0.0",
"com.unity.modules.xr": "1.0.0"
}
}
17 changes: 17 additions & 0 deletions ProjectSettings/AudioManager.asset
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!11 &1
AudioManager:
m_ObjectHideFlags: 0
m_Volume: 1
Rolloff Scale: 1
Doppler Factor: 1
Default Speaker Mode: 2
m_SampleRate: 0
m_DSPBufferSize: 1024
m_VirtualVoiceCount: 512
m_RealVoiceCount: 32
m_SpatializerPlugin:
m_AmbisonicDecoderPlugin:
m_DisableAudio: 0
m_VirtualizeEffects: 1
6 changes: 6 additions & 0 deletions ProjectSettings/ClusterInputManager.asset
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!236 &1
ClusterInputManager:
m_ObjectHideFlags: 0
m_Inputs: []
Loading

0 comments on commit 8d11a1c

Please sign in to comment.