First commit on my server, yey!

This commit is contained in:
Sebastian Bularca
2026-03-19 18:12:07 +01:00
parent 5139ec2cec
commit fedd1961a0
602 changed files with 101587 additions and 6 deletions

View File

@@ -0,0 +1,46 @@
using UnityEditor;
using UnityEngine;
namespace Nox.EditorCode {
#if UNITY_EDITOR
public enum BootType {
FullBoot,
SceneBoot,
UnityDefault
}
/// <summary>
/// Allows the user to set the boot mode for the project which will be used by the EntryPoint to mark if the startup scene should be loaded or not
/// </summary>
[ExecuteInEditMode]
public class BootMode : MonoBehaviour {
public static BootType BootType {
get => (BootType)EditorPrefs.GetInt("bootType");
private set {
EditorPrefs.SetInt("bootType", (int)value);
Debug.Log($"Boot mode {BootType} set...");
}
}
private void OnEnable() {
if(!EditorPrefs.HasKey("bootType")) {
BootType = BootType.UnityDefault;
}
}
[MenuItem("Nox/Boot/Full Boot...", false)]
private static void SetFullBoot() {
BootType = BootType.FullBoot;
}
[MenuItem("Nox/Boot/Scene Boot...", false)]
private static void SetSceneBoot() {
BootType = BootType.SceneBoot;
}
[MenuItem("Nox/Boot/Unity Default No Boot...", false)]
private static void SetDefaultBoot() {
BootType = BootType.UnityDefault;
}
}
#endif
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 2108493160a8044a1b742355e4fc0e9c

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 62f869281de314cf7956996cef15aefa
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,28 @@
using UnityEditor;
using UnityEngine;
namespace Nox.Core
{
[CustomEditor(typeof(SceneReference))]
public class SceneReferenceEditor : Editor {
private SceneReference sceneReference;
private SerializedProperty gameState;
private SerializedProperty playMode;
private void OnEnable() {
sceneReference = (SceneReference)target;
playMode = serializedObject.FindProperty("playMode");
gameState = serializedObject.FindProperty("gameState");
}
public override void OnInspectorGUI() {
EditorGUILayout.PropertyField(gameState, new GUIContent("Game Active State"));
if(sceneReference.gameState == GameState.GameMode) {
EditorGUILayout.PropertyField(playMode, new GUIContent("Play Mode"));
}
serializedObject.ApplyModifiedProperties();
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: c6fdc03906db404a8f51b19aadd8e304
timeCreated: 1770537083