Skip to content

Commit b2d6c20

Browse files
committed
conditionally loading ingame console
1 parent 9e88752 commit b2d6c20

File tree

7 files changed

+81
-3
lines changed

7 files changed

+81
-3
lines changed

Assets/Plugins/IngameDebugConsole/Resources.meta

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

Assets/Plugins/IngameDebugConsole/IngameDebugConsole.prefab renamed to Assets/Plugins/IngameDebugConsole/Resources/IngameDebugConsole.prefab

File renamed without changes.

Assets/Plugins/IngameDebugConsole/IngameDebugConsole.prefab.meta renamed to Assets/Plugins/IngameDebugConsole/Resources/IngameDebugConsole.prefab.meta

File renamed without changes.

Packages/Sequence-Unity/Sequence/Samples~/Demo/Demo.unity

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -685,6 +685,50 @@ Transform:
685685
m_Children: []
686686
m_Father: {fileID: 0}
687687
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
688+
--- !u!1 &1741005931
689+
GameObject:
690+
m_ObjectHideFlags: 0
691+
m_CorrespondingSourceObject: {fileID: 0}
692+
m_PrefabInstance: {fileID: 0}
693+
m_PrefabAsset: {fileID: 0}
694+
serializedVersion: 6
695+
m_Component:
696+
- component: {fileID: 1741005932}
697+
- component: {fileID: 1741005933}
698+
m_Layer: 0
699+
m_Name: ConsoleLoader
700+
m_TagString: Untagged
701+
m_Icon: {fileID: 0}
702+
m_NavMeshLayer: 0
703+
m_StaticEditorFlags: 0
704+
m_IsActive: 1
705+
--- !u!4 &1741005932
706+
Transform:
707+
m_ObjectHideFlags: 0
708+
m_CorrespondingSourceObject: {fileID: 0}
709+
m_PrefabInstance: {fileID: 0}
710+
m_PrefabAsset: {fileID: 0}
711+
m_GameObject: {fileID: 1741005931}
712+
serializedVersion: 2
713+
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
714+
m_LocalPosition: {x: 0, y: 0, z: 0}
715+
m_LocalScale: {x: 1, y: 1, z: 1}
716+
m_ConstrainProportionsScale: 0
717+
m_Children: []
718+
m_Father: {fileID: 0}
719+
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
720+
--- !u!114 &1741005933
721+
MonoBehaviour:
722+
m_ObjectHideFlags: 0
723+
m_CorrespondingSourceObject: {fileID: 0}
724+
m_PrefabInstance: {fileID: 0}
725+
m_PrefabAsset: {fileID: 0}
726+
m_GameObject: {fileID: 1741005931}
727+
m_Enabled: 1
728+
m_EditorHideFlags: 0
729+
m_Script: {fileID: 11500000, guid: 9d41a400b2469404d874e907b3ff5e35, type: 3}
730+
m_Name:
731+
m_EditorClassIdentifier:
688732
--- !u!1 &1972594757
689733
GameObject:
690734
m_ObjectHideFlags: 0
@@ -933,4 +977,5 @@ SceneRoots:
933977
- {fileID: 1327297841}
934978
- {fileID: 1995973479}
935979
- {fileID: 171231629}
980+
- {fileID: 1741005932}
936981
- {fileID: 220330150}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using UnityEngine;
2+
3+
namespace Sequence.Boilerplates
4+
{
5+
// Let's instantiate the IngameDebugConsole from Resources only if it exists.
6+
public class ConsoleLoader : MonoBehaviour
7+
{
8+
private void Start()
9+
{
10+
var consolePrefab = Resources.Load<GameObject>("IngameDebugConsole");
11+
if (!consolePrefab)
12+
return;
13+
14+
Instantiate(consolePrefab);
15+
}
16+
}
17+
}

Packages/Sequence-Unity/Sequence/SequenceBoilerplates/Scripts/Common/ConsoleLoader.cs.meta

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

Packages/Sequence-Unity/Sequence/SequenceSDK/Config/Editor/VersionSetter.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using UnityEditor;
22
using System.IO;
33
using UnityEditor.Callbacks;
4-
using UnityEngine;
54

65
namespace Sequence.Config.Editor
76
{
@@ -12,8 +11,6 @@ public static class VersionSetter
1211
[DidReloadScripts]
1312
private static void InjectSDKVersionIntoResources()
1413
{
15-
Debug.Log("Injecting SDK version into Resources 2");
16-
1714
string version = PackageVersionReader.GetVersion();
1815
string versionFilePath = "Assets/Resources/sequence-unity-version.txt";
1916

0 commit comments

Comments
 (0)