|
@@ -35,6 +35,7 @@ namespace FeatureExamples
|
|
|
protected float Pitch { get; set; }
|
|
protected float Pitch { get; set; }
|
|
|
protected bool TouchEnabled { get; set; }
|
|
protected bool TouchEnabled { get; set; }
|
|
|
protected Node CameraNode { get; set; }
|
|
protected Node CameraNode { get; set; }
|
|
|
|
|
+ protected Scene scene;
|
|
|
|
|
|
|
|
protected UIView UIView { get; set; }
|
|
protected UIView UIView { get; set; }
|
|
|
|
|
|
|
@@ -64,6 +65,11 @@ namespace FeatureExamples
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ protected virtual void Stop()
|
|
|
|
|
+ {
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
protected virtual void Update(float timeStep)
|
|
protected virtual void Update(float timeStep)
|
|
|
{
|
|
{
|
|
|
MoveCameraByTouches(timeStep);
|
|
MoveCameraByTouches(timeStep);
|
|
@@ -197,6 +203,8 @@ namespace FeatureExamples
|
|
|
|
|
|
|
|
protected void BackToSelector()
|
|
protected void BackToSelector()
|
|
|
{
|
|
{
|
|
|
|
|
+ Stop();
|
|
|
|
|
+
|
|
|
GetSubsystem<Input>().SetMouseVisible(true);
|
|
GetSubsystem<Input>().SetMouseVisible(true);
|
|
|
UnsubscribeFromAllEvents();
|
|
UnsubscribeFromAllEvents();
|
|
|
var renderer = GetSubsystem<Renderer>();
|
|
var renderer = GetSubsystem<Renderer>();
|
|
@@ -206,6 +214,11 @@ namespace FeatureExamples
|
|
|
}
|
|
}
|
|
|
SampleSelector.sampleRef = null;
|
|
SampleSelector.sampleRef = null;
|
|
|
SampleSelector.UIView.DeleteAllChildren();
|
|
SampleSelector.UIView.DeleteAllChildren();
|
|
|
|
|
+
|
|
|
|
|
+ scene?.Dispose();
|
|
|
|
|
+
|
|
|
|
|
+ GetSubsystem<ResourceCache>().ReleaseAllResources();
|
|
|
|
|
+
|
|
|
new SampleSelector();
|
|
new SampleSelector();
|
|
|
}
|
|
}
|
|
|
|
|
|