Skip to content

Commit 8b660ae

Browse files
committed
Fixed Scene 2 Spiral
Original code was using the same Instance of TargetObjectController. New code now changes the static Instance once the scene switches.
1 parent 0f96dd2 commit 8b660ae

File tree

6 files changed

+32
-10
lines changed

6 files changed

+32
-10
lines changed

Assets/AZURE Nature/SRP Packages/Built-in.unitypackage.meta

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/AZURE Nature/SRP Packages/URP.unitypackage.meta

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/Joshua Work/TargetObjectController.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,11 @@ public class TargetObjectController : MonoBehaviour
2121
public static TargetObjectController Instance { get; private set; }
2222
private void Awake()
2323
{
24-
if (Instance != null && Instance != this)
24+
if (Instance != null)
2525
{
26-
Destroy(this);
27-
}
28-
else
29-
{
30-
Instance = this;
26+
Destroy(Instance);
3127
}
28+
Instance = this;
3229
}
3330
#endregion
3431

Assets/LowPolyRetroCars/_Common/Materials/SRP/LowPolyRetroCarsMaterials_LWRP.unitypackage.meta

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/Scenes/MainCues.unity

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ RenderSettings:
3838
m_ReflectionIntensity: 1
3939
m_CustomReflection: {fileID: 0}
4040
m_Sun: {fileID: 0}
41-
m_IndirectSpecularColor: {r: 0.37311953, g: 0.38074014, b: 0.3587274, a: 1}
41+
m_IndirectSpecularColor: {r: 0.37311918, g: 0.3807398, b: 0.35872716, a: 1}
4242
m_UseRadianceAmbientProbe: 0
4343
--- !u!157 &3
4444
LightmapSettings:
@@ -406140,7 +406140,7 @@ MonoBehaviour:
406140406140
m_Script: {fileID: 11500000, guid: 00b7503a3db730044bdeb705052c0fe8, type: 3}
406141406141
m_Name:
406142406142
m_EditorClassIdentifier:
406143-
targetObject: {fileID: 0}
406143+
targetObject: {fileID: 216021446}
406144406144
arrowLocation: {fileID: 608788435}
406145406145
rotateSpeed: 0.025
406146406146
amplitude: 0.25
@@ -793707,7 +793707,7 @@ GameObject:
793707793707
m_Icon: {fileID: 0}
793708793708
m_NavMeshLayer: 0
793709793709
m_StaticEditorFlags: 0
793710-
m_IsActive: 1
793710+
m_IsActive: 0
793711793711
--- !u!114 &1184972797
793712793712
MonoBehaviour:
793713793713
m_ObjectHideFlags: 0
@@ -1168958,16 +1168958,19 @@ MonoBehaviour:
11689581168958
- {fileID: 850850719}
11689591168959
- {fileID: 8387274}
11689601168960
- {fileID: 745566007}
1168961+
- {fileID: 216021446}
11689611168962
actualObjectList:
11689621168963
- {fileID: 330498544}
11689631168964
- {fileID: 831804677}
11689641168965
- {fileID: 130995416}
11689651168966
- {fileID: 2142208997}
1168967+
- {fileID: 0}
11689661168968
targetDistanceList:
11689671168969
- -1
11689681168970
- -1
11689691168971
- -1
11689701168972
- -1
1168973+
- -1
11689711168974
--- !u!1 &1748980862
11689721168975
GameObject:
11689731168976
m_ObjectHideFlags: 0
@@ -1251328,7 +1251331,7 @@ MonoBehaviour:
12513281251331
m_EditorClassIdentifier:
12513291251332
indicatorSystem: {fileID: 1865445975}
12513301251333
explosionSystem: {fileID: 739581914}
1251331-
targetObject: {fileID: 0}
1251334+
targetObject: {fileID: 216021446}
12513321251335
driftSpeed: 2
12513331251336
timeChange: 1
12513341251337
closeEnough: 2

Assets/Study/Tutorial/TutorialController.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ void Start()
4848
{
4949
clips = GetComponentsInChildren<TutorialClip>(true);
5050

51+
ReadyNextScene();
5152
LoadClip(currentClip);
5253

5354
sessionName = "tut-" + System.DateTime.Now.ToString("MM-dd-yyy_hh-mm")+".txt";

0 commit comments

Comments
 (0)