Schedule refresh after initial world mount
This commit is contained in:
parent
2ed4e263ee
commit
a4e91fc3a3
1 changed files with 4 additions and 2 deletions
|
|
@ -17,7 +17,7 @@ namespace GameCult.Eve.UnityScene
|
||||||
[SerializeField] private MonoBehaviour? fallbackAssetProvider;
|
[SerializeField] private MonoBehaviour? fallbackAssetProvider;
|
||||||
[SerializeField] private bool connectOnEnable;
|
[SerializeField] private bool connectOnEnable;
|
||||||
[SerializeField] private bool refreshInUpdate = true;
|
[SerializeField] private bool refreshInUpdate = true;
|
||||||
[SerializeField] private float refreshIntervalSeconds = 0.1f;
|
[SerializeField] private float refreshIntervalSeconds = 1f;
|
||||||
[SerializeField] private bool renderShotTrajectories = true;
|
[SerializeField] private bool renderShotTrajectories = true;
|
||||||
|
|
||||||
private float _nextRefreshAt;
|
private float _nextRefreshAt;
|
||||||
|
|
@ -94,7 +94,9 @@ namespace GameCult.Eve.UnityScene
|
||||||
if (thermal == null) thermal = gameObject.AddComponent<EveUnityThermalPresenter>();
|
if (thermal == null) thermal = gameObject.AddComponent<EveUnityThermalPresenter>();
|
||||||
thermal.Bind(this, Runtime.GameObjectAssetProvider as IEveUnityNativeAssetProvider);
|
thermal.Bind(this, Runtime.GameObjectAssetProvider as IEveUnityNativeAssetProvider);
|
||||||
|
|
||||||
return Runtime.Connect();
|
var presentation = Runtime.Connect();
|
||||||
|
_nextRefreshAt = Time.unscaledTime + Math.Max(0.01f, refreshIntervalSeconds);
|
||||||
|
return presentation;
|
||||||
}
|
}
|
||||||
|
|
||||||
public EveUnityPlayableWorldPresentation Refresh()
|
public EveUnityPlayableWorldPresentation Refresh()
|
||||||
|
|
|
||||||
Reference in a new issue