[정영민] 이전 XRLib 기능 제거 및 가데이터 변경 작업

26.01.28
- WI.XRLib 코드 제거 및 적용된 기능 수정 작업
- 종합 진행, 작업 진행, 생산 진행, 조립 진행, 최종 검사,
  설비 대시보드 데이터 가데이터로 변경
This commit is contained in:
정영민
2026-01-28 17:45:31 +09:00
parent 8f920378fb
commit 897f071168
247 changed files with 31183 additions and 65882 deletions

View File

@@ -1,116 +0,0 @@
using System;
using UnityEngine;
using UnityEngineInternal;
using WI;
using Object = UnityEngine.Object;
[Serializable]
public partial class MonoBehaviour : UnityEngine.MonoBehaviour
{
public virtual void AfterAwake()
{
}
public virtual void AfterStart()
{
}
public MonoBehaviour()
{
if (this.GetType() != typeof(TrashBehaviour))
Hooker.RegistReady(this);
}
public T FindSingle<T>() where T : MonoBehaviour, ISingle
{
var hashCode = typeof(T).GetHashCode();
T result = default;
if (Core.singleTable.TryGetValue(hashCode, out var mb))
{
result = (T)mb;
return result;
}
return result;
}
public T Find<T>(string name) where T : Component
{
return transform.Find<T>(name);
}
public new static Object Instantiate(Object original, Vector3 position, Quaternion rotation)
{
var no = Object.Instantiate(original, position, rotation);
Core.Regist(no);
return no;
}
[TypeInferenceRule(TypeInferenceRules.TypeOfFirstArgument)]
public new static Object Instantiate(Object original, Vector3 position, Quaternion rotation, Transform parent)
{
var no = Object.Instantiate(original, position, rotation, parent);
Core.Regist(no);
return no;
}
[TypeInferenceRule(TypeInferenceRules.TypeOfFirstArgument)]
public new static Object Instantiate(Object original)
{
var no = Object.Instantiate(original);
Core.Regist(no);
return no;
}
[TypeInferenceRule(TypeInferenceRules.TypeOfFirstArgument)]
public new static Object Instantiate(Object original, Transform parent)
{
var no = Object.Instantiate(original, parent, instantiateInWorldSpace: false);
Core.Regist(no);
return no;
}
[TypeInferenceRule(TypeInferenceRules.TypeOfFirstArgument)]
public new static Object Instantiate(Object original, Transform parent, bool instantiateInWorldSpace)
{
var no = Object.Instantiate(original, parent, instantiateInWorldSpace);
Core.Regist(no);
return no;
}
public new static T Instantiate<T>(T original) where T : Object
{
var no = Object.Instantiate(original);
Core.Regist(no);
return no;
}
public new static T Instantiate<T>(T original, Vector3 position, Quaternion rotation) where T : Object
{
var no = (T)Object.Instantiate((Object)original, position, rotation);
Core.Regist(no);
return no;
}
public new static T Instantiate<T>(T original, Vector3 position, Quaternion rotation, Transform parent) where T : Object
{
var no = (T)Object.Instantiate((Object)original, position, rotation, parent);
Core.Regist(no);
return no;
}
public new static T Instantiate<T>(T original, Transform parent) where T : Object
{
var no = Object.Instantiate(original, parent, worldPositionStays: false);
Core.Regist(no);
return no;
}
public new static T Instantiate<T>(T original, Transform parent, bool worldPositionStays) where T : Object
{
var no = (T)Object.Instantiate((Object)original, parent, worldPositionStays);
Core.Regist(no);
return no;
}
protected virtual void OnDestroy()
{
if (this.GetType() != typeof(TrashBehaviour))
WI.Core.Unregist(this);
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 14680c4a14a850945a9d70b0201a8c48
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,7 +0,0 @@
namespace WI
{
public partial class TrashBehaviour : UnityEngine.MonoBehaviour
{
public MonoBehaviour originBehaviour;
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 76093983882db5c4097283b7a0212da7
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,364 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using UnityEditor;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.SceneManagement;
using Object = UnityEngine.Object;
namespace WI
{
public static partial class Core
{
#pragma warning disable IDE0090 // 'new(...)' 사용
static Queue<MonoBehaviour> watingQueue = new Queue<MonoBehaviour>();
internal static Dictionary<MonoBehaviour, GameObject> monoTable = new Dictionary<MonoBehaviour, GameObject>();
internal static Dictionary<int, MonoBehaviour> singleTable = new Dictionary<int, MonoBehaviour>();
internal static Dictionary<int, MonoBehaviour> keyTable = new Dictionary<int, MonoBehaviour>();
static Dictionary<Type, List<MonoBehaviour>> diWaitingTable = new Dictionary<Type, List<MonoBehaviour>>();
//internal static HashSet<IGetKey> getKeyActors = new HashSet<IGetKey>();
//internal static HashSet<IGetKeyUp> getKeyUpActors = new HashSet<IGetKeyUp>();
//internal static HashSet<IGetKeyDown> getKeyDownActors = new HashSet<IGetKeyDown>();
#pragma warning restore IDE0090 // 'new(...)' 사용
static Core()
{
//Debug.Log("WISystem Active");
SceneManager.sceneLoaded += OnSceneLoaded;
}
private static void OnSceneLoaded(Scene arg0, LoadSceneMode arg1)
{
Init();
}
static void Init()
{
monoTable.Clear();
singleTable.Clear();
diWaitingTable.Clear();
//keyTable.NullCleaning();
//getKeyActors.Clear();
//getKeyUpActors.Clear();
//getKeyDownActors.Clear();
}
public static void Regist(Object mo)
{
if (mo is not MonoBehaviour)
return;
if (!Regist(mo as MonoBehaviour))
return;
Hooker.initializerList.Enqueue(mo as MonoBehaviour);
Hooker.Initializing();
}
internal static bool Regist(MonoBehaviour mb)
{
//?? Addressable 다운로드를 하면 null mb가 생성된다.
if (mb.gameObject == null)
return false;
if (!mb.gameObject.scene.isLoaded)
return false;
//Debug.Log($"Regist {mb.name}");
if (!monoTable.TryAdd(mb, mb.gameObject))
{
//Debug.Log($"Regist failed : {mb.name}");
return false;
}
if (!RegistSingleBehaviour(mb))
return false;
//if (!RegistHotKeyBinding(mb))
// return false;
//RegistKeyboardActor(mb);
Injection(mb);
return true;
}
//static void RegistKeyboardActor(MonoBehaviour mb)
//{
// if (mb is not IKeyboardActor)
// return;
// if (mb is IGetKey gk)
// getKeyActors.Add(gk);
// if (mb is IGetKeyUp gu)
// getKeyUpActors.Add(gu);
// if (mb is IGetKeyDown gd)
// getKeyDownActors.Add(gd);
//}
internal static void Unregist(MonoBehaviour mb)
{
//Debug.Log($"Unregist:{mb.name}");
monoTable.Remove(mb);
if (mb is ISingle)
singleTable.Remove(mb.GetHashCode());
//if (mb is IHotkeyAction hk)
// keyTable.Remove(mb.GetHashCode());
//if (mb is IKeyboardActor)
//{
// if (mb is IGetKey gk)
// getKeyActors.Remove(gk);
// if (mb is IGetKeyUp gu)
// getKeyUpActors.Remove(gu);
// if (mb is IGetKeyDown gd)
// getKeyDownActors.Remove(gd);
//}
}
//static bool RegistHotKeyBinding(MonoBehaviour mb)
//{
// if (mb is not IHotkeyAction)
// return true;
// var hashCode = mb.GetType().GetHashCode();
// if (keyTable.ContainsKey(hashCode))
// {
// if (keyTable[hashCode].GetHashCode() != mb.GetHashCode())
// {
// TrashThrow(mb, keyTable[hashCode]);
// return false;
// }
// return false;
// }
// keyTable.Add(hashCode, mb);
// return true;
//}
static bool RegistStandardSingle(MonoBehaviour mb)
{
var hashCode = mb.GetType().GetHashCode();
//Debug.Log($"Regist Single {wi}");
if (singleTable.ContainsKey(hashCode))
{
//Debug.Log($"SameCode! Origin={singleTable[hashCode].gameObject.name}, New={wi.gameObject.name}");
if (singleTable[hashCode].GetHashCode() != mb.GetHashCode())
{
//Debug.Log($"Move To Trash");
TrashThrow(mb, singleTable[hashCode]);
return false;
}
return false;
}
singleTable.Add(hashCode, mb);
if (diWaitingTable.TryGetValue(mb.GetType(), out var watingList))
{
//Debug.Log($"Find Wating Table");
foreach (var w in watingList)
{
var injectTargets = w.GetType().GetAllFields();
foreach (var t in injectTargets)
{
if (t.FieldType == mb.GetType())
{
//Debug.Log($"Find Missing");
t.SetValue(w, mb);
}
}
}
}
//Debug.Log($"RS_{mb.name}");
return true;
}
//static Dictionary<Transform, HashSet<int>> singleChildTable = new();
//static bool RegistChildSingle(MonoBehaviour mb)
//{
// var parent = mb.transform.parent;
// if (parent == null)
// {
// return false;
// }
// if(!singleChildTable.ContainsKey(parent))
// {
// singleChildTable.Add(parent, new HashSet<int>());
// }
// var childTable = singleChildTable[parent];
// var hashCode = mb.GetType().GetHashCode();
// if (!childTable.Add(hashCode))
// {
// return false;
// }
//}
static bool RegistSingleBehaviour(MonoBehaviour mb)
{
if (mb is not ISingle)
return true;
bool result;
switch (mb)
{
//case ISingleChild sc:
// //result = RegistChildSingle(mb);
// break;
default:
result = RegistStandardSingle(mb);
break;
}
return result;
}
internal static void Injection(MonoBehaviour mb)
{
var wiType = mb.GetType();
var targetFields = wiType.GetAllFields();
List<Component> childs = mb.transform.FindAll<Component>();
List<UIBehaviour> uiElements = new ();
List<Transform> childTransforms = new ();
//Filtering
foreach (var c in childs)
{
if (c == null)
continue;
var cType = c.GetType();
if (cType.IsSubclassOf(typeof(UIBehaviour)))
{
uiElements.Add(c as UIBehaviour);
continue;
}
if (cType.IsSubclassOf(typeof(Transform)) || cType.Equals(typeof(Transform)) || cType.Equals(typeof(RectTransform)))
{
childTransforms.Add(c as Transform);
continue;
}
}
foreach (var f in targetFields)
{
#region LabelInjection
Label label = (Label)f.GetCustomAttribute(typeof(Label));
if (label != null)
{
foreach (var c in childs)
{
if (c.name.Equals(label.name))
{
if (c.TryGetComponent(label.target, out var value))
{
f.SetValue(mb, value);
}
}
}
}
#endregion
#region ISingleInjection
if (f.FieldType.GetInterface(nameof(ISingle)) != null)
{
//Debug.Log($"{wi} in ISingle.");
if (singleTable.TryGetValue(f.FieldType.GetHashCode(), out var value))
{
//Debug.Log($"Inject {value}");
f.SetValue(mb, value);
}
else
{
if (!diWaitingTable.ContainsKey(f.FieldType))
{
diWaitingTable.Add(f.FieldType, new List<MonoBehaviour>());
}
diWaitingTable[f.FieldType].Add(mb);
//Debug.Log($"Inject Waiting {wi}");
}
continue;
}
#endregion
#region IHotkeybinding
//if (f.FieldType.GetInterface(nameof(IHotkeyAction)) != null)
//{
// //Debug.Log($"{wi} in ISingle.");
// if (keyTable.TryGetValue(f.FieldType.GetHashCode(), out var value))
// {
// //Debug.Log($"Inject {value}");
// f.SetValue(mb, value);
// }
// continue;
//}
#endregion
#region UIBehaviourInjection
if (f.FieldType.IsSubclassOf(typeof(UIBehaviour)))
{
InjectNameAndType(uiElements, f, mb);
continue;
}
#endregion
#region TransformInjection
if (f.FieldType.IsSubclassOf(typeof(Transform)) || f.FieldType.Equals(typeof(Transform)))
{
InjectNameAndType(childTransforms, f, mb);
continue;
}
if (f.FieldType.Equals(typeof(RectTransform)))
{
InjectNameAndType(childTransforms, f, mb);
}
#endregion
if (f.FieldType.IsGenericType)
{
if (f.FieldType.GetGenericTypeDefinition().Equals(typeof(Container<>)))
{
var loadType = f.FieldType.GetGenericArguments()[0];
var containerType = typeof(Container<>).MakeGenericType(new Type[] { loadType });
var container = Activator.CreateInstance(containerType);
var stuffs = childs
.Where(c => loadType.Equals(c.GetType()));
container.GetType().GetMethod("Loading").Invoke(container, new object[] { stuffs });
f.SetValue(mb, container);
}
}
}
}
static void TrashThrow(MonoBehaviour target, MonoBehaviour origin)
{
var trash = target.gameObject.AddComponent<TrashBehaviour>();
trash.originBehaviour = origin;
monoTable.Remove(target);
GameObject.Destroy(target);
}
static void InjectNameAndType<T>(List<T> arr, FieldInfo info, MonoBehaviour target) where T : Component
{
foreach (var a in arr)
{
if (!a.name.Equals(info.Name))
continue;
if (!a.GetType().Equals(info.FieldType))
continue;
info.SetValue(target, a);
return;
}
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 9b4e285aec24c0f4ba48c460bdb6ae1d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,91 +0,0 @@
using System;
using System.Collections.Generic;
using System.Reflection;
using UnityEngine;
using UnityEngine.Video;
namespace WI
{
public static partial class FieldBinder
{
public class Model
{
readonly object origin;
readonly Type originType;
public Model(in object o)
{
origin = o;
originType = o.GetType();
}
class FieldContainer
{
public FieldInfo info;
public object value;
public Action changeEvent;
}
Dictionary<string, FieldContainer> fieldTable = new();
public Model Binding(in string targetField, Action changeEvent)
{
if(!fieldTable.TryGetValue(targetField, out var fi))
{
var fieldInfo = originType.GetField(targetField, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);
if (fieldInfo == null)
{
Debug.LogError($"Not Found {targetField}.");
return null;
}
var value = fieldInfo.GetValue(origin);
fi = new FieldContainer()
{
info = fieldInfo,
value = value,
};
fieldTable.Add(targetField, fi);
}
fi.changeEvent += changeEvent;
return this;
}
public void CheckChange()
{
foreach(var f in fieldTable)
{
var curr = f.Value.info.GetValue(origin);
if (f.Value.value.Equals(curr))
continue;
fieldTable[f.Key].value = curr;
f.Value.changeEvent?.Invoke();
}
}
}
static Dictionary<object, Model> models = new();
static FieldBinder()
{
models.Clear();
}
public static void Update()
{
foreach(var m in models)
{
m.Value.CheckChange();
}
}
public static Model Regist(in object o)
{
if(models.TryGetValue(o, out var mo))
{
return mo;
}
var model = new Model(o);
models.Add(o,model);
return model;
}
public static void Unregist(in object o)
{
models.Remove(o);
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: db7f8606c3490f54ca7bb60a2e32e0d3
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,61 +0,0 @@
using System;
using System.Collections.Generic;
using UnityEngine;
namespace WI
{
public partial class Hooker
{
//static Array codes;
internal static void Initialize()
{
//codes = Enum.GetValues(typeof(KeyCode));
PlayerLoopInterface.InsertSystemAfter(typeof(FieldBinder), FieldBinder.Update, typeof(UnityEngine.PlayerLoop.EarlyUpdate.UpdatePreloading));
PlayerLoopInterface.InsertSystemAfter(typeof(Hooker), MonoTracking, typeof(UnityEngine.PlayerLoop.EarlyUpdate.UpdatePreloading));
//PlayerLoopInterface.InsertSystemBefore(typeof(Hooker), DetectingKey, typeof(UnityEngine.PlayerLoop.PreUpdate.NewInputUpdate));
//SetHook();
}
internal static Queue<MonoBehaviour> initializerList = new();
static Queue<MonoBehaviour> afterInitializerList = new();
static Queue<MonoBehaviour> registWatingQueue = new();
//[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
static void MonoTracking()
{
while (registWatingQueue.Count > 0)
{
var curr = registWatingQueue.Dequeue();
if (curr != null)
{
if (Core.Regist(curr))
initializerList.Enqueue(curr);
}
}
Initializing();
}
internal static void Initializing()
{
while (initializerList.Count > 0)
{
var mono = initializerList.Dequeue();
mono.AfterAwake();
//Debug.Log($"{mono.GetType().Name} Initialized");
afterInitializerList.Enqueue(mono);
}
while (afterInitializerList.Count > 0)
{
var curr = afterInitializerList.Dequeue();
curr.AfterStart();
// Debug.Log($"{curr.GetType().Name} AfterInitialized");
}
}
public static void RegistReady(MonoBehaviour target)
{
registWatingQueue.Enqueue(target);
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 3352831bcb4149947b4702dc5a4a2d7f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,88 +0,0 @@
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
namespace WI
{
[DefaultExecutionOrder(int.MaxValue)]
public partial class Initializer : MonoBehaviour,ISingle
{
public List<MonoBehaviour> targets = new();
public List<UIBase> baseUIs = new();
HashSet<UIBase> allUIs = new();
HashSet<CanvasBase> canvasBases = new();
void GetAllInitializer()
{
var sceneRootObjs = SceneManager.GetActiveScene().GetRootGameObjects();
targets.Clear();
foreach (var obj in sceneRootObjs)
{
var inits = obj.transform.FindAll<MonoBehaviour>();
targets.AddRange(inits);
}
}
void Awake()
{
//Debug.Log("Initializing");
GetAllInitializer();
ForceActive();
}
void ForceActive()
{
var activeTable = new Dictionary<MonoBehaviour, bool>();
foreach (var target in targets)
{
activeTable.Add(target, target.gameObject.activeSelf);
target.gameObject.SetActive(true);
}
foreach (var a in activeTable)
{
//if (a.Key.gameObject == null)
//{
// Debug.LogError($"Wrong Object!?");
// continue;
//}
if (a.Key is UIBase ui)
SetUI(ui);
if (a.Value == false)
a.Key.gameObject.SetActive(false);
}
}
void SetUI(UIBase ui)
{
if (!allUIs.Add(ui))
{
Debug.LogError($"Duplicate Initialize. {ui}");
return;
}
if (ui is CanvasBase cb)
{
if (!canvasBases.Add(cb))
{
Debug.LogError($"Canvas Initialize Failed! {cb}");
}
return;
}
if (ui is PanelBase pb)
{
var parentCanvas = pb.GetComponentInParent<CanvasBase>();
canvasBases.Add(parentCanvas);
var panelType = pb.GetType();
var canvasPanelField = parentCanvas
.GetType()
.GetField(panelType.Name.ToLower(), System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.Public);
canvasPanelField?.SetValue(parentCanvas, pb);
}
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 8f5ed8769a673ad45ad3ee3267e97c7c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,17 +0,0 @@
using System;
namespace WI
{
[AttributeUsage(AttributeTargets.Field)]
public partial class Label : Attribute
{
public string name;
public Type target;
public Label(Type targetType, string gameObjectName)
{
target = targetType;
name = gameObjectName;
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 12a0a05c8128e274c87cefe190f91c41
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,58 +0,0 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using WI;
public class OptionBase
{
public string section;
public Dictionary<string, string> options= new Dictionary<string, string>();
public MonoBehaviour target;
public OptionBase(MonoBehaviour mb)
{
target = mb;
var targetFields = mb.GetType().GetAllFields();
foreach (var f in targetFields)
{
var attributes = f.GetCustomAttributes(typeof(OptionAttribute), false);
if (attributes.Count() != 0)
{
switch (attributes[0])
{
case OptionKeyAttribute ok:
options.Add(f.Name, f.GetValue(mb).ToString());
break;
case OptionSectionAttribute os:
section = f.Name;
break;
}
}
}
}
public void SetValue(MonoBehaviour mb)
{
var t = mb.GetType();
foreach(var option in options)
{
var field = t.GetAllField(option.Key);
field.SetValue(mb, option.Value);
}
}
}
[AttributeUsage(AttributeTargets.Field )]
public class OptionKeyAttribute : OptionAttribute
{
}
[AttributeUsage(AttributeTargets.Field)]
public class OptionSectionAttribute: OptionAttribute
{
}
[AttributeUsage(AttributeTargets.Field)]
public class OptionAttribute : Attribute { }

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: d3b2961dddbd2e243bc847215dea2ab9
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,119 +0,0 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Text;
using UnityEngine;
using WI;
namespace WI
{
public class OptionManager : MonoBehaviour, ISingle
{
[DllImport("kernel32", CharSet = CharSet.Unicode)]
static extern long WritePrivateProfileString(string Section, string Key, string Value, string FilePath);
[DllImport("kernel32", CharSet = CharSet.Unicode)]
static extern int GetPrivateProfileString(string Section, string Key, string Default, StringBuilder RetVal, int Size, string FilePath);
private string filePath;
public Dictionary<MonoBehaviour, OptionBase> optionBases = new();
public Action onCompletedLoadOption;
public void LoadOption()
{
#if UNITY_EDITOR
filePath = "./Option.ini";
#else
filePath = "./Option.ini";
#endif
var allBehaviours = Core.singleTable.Values;
var optionables = allBehaviours.Where(mo=>mo is IOptionable).ToList();
var defaultOptionBases = optionables.Select(mo => new OptionBase(mo)).ToList();
if (!File.Exists(filePath))
{
//Create
StringBuilder sb = new StringBuilder();
using (var fs = File.Create(filePath))
{
foreach (var optionBase in defaultOptionBases)
{
var section = optionBase.section;
sb.AppendLine($"[{section}]");
foreach (var option in optionBase.options)
{
sb.AppendLine($"{option.Key}={option.Value}");
}
sb.AppendLine();
}
var bytes = Encoding.UTF8.GetBytes(sb.ToString());
fs.Write(bytes, 0, bytes.Length);
fs.Flush();
}
}
foreach (var defaultOption in defaultOptionBases)
{
var section = defaultOption.section;
Dictionary<string, string> temp = new Dictionary<string, string>();
foreach (var option in defaultOption.options)
{
var key = option.Key;
var newValue = StringDataReadIni(filePath, section, key);
if (newValue == "")
{
WritePrivateProfileString(section, key, option.Value, filePath);
newValue = option.Value;
}
temp.Add(key, newValue);
}
defaultOption.options = temp;
defaultOption.SetValue(defaultOption.target);
optionBases.Add(defaultOption.target, defaultOption);
}
onCompletedLoadOption?.Invoke();
}
public string StringDataReadIni(string filePath, string section, string key)
{
StringBuilder buffer = new StringBuilder(1024);
GetPrivateProfileString(section, key, "", buffer, 1024, filePath);
return buffer.ToString();
}
public Dictionary<string, string> GetOption(MonoBehaviour mb)
{
var defaultOption = optionBases[mb];
return defaultOption.options;
}
public void SetOptionValue(MonoBehaviour mb, Dictionary<string, string> optionData)
{
Dictionary<string, string> temp = new Dictionary<string, string>();
var defaultOption = optionBases[mb];
var section = defaultOption.section;
temp.Clear();
foreach(var key in defaultOption.options.Keys)
{
temp.Add(key, defaultOption.options[key]);
}
foreach (var option in optionData)
{
var key = option.Key;
if (temp.ContainsKey(key))
{
WritePrivateProfileString(section, key, optionData[key], filePath);
temp[key] = optionData[key];
}
}
defaultOption.options = temp;
defaultOption.SetValue(defaultOption.target);
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 7ff07d22cd1e17a48b2f82803902b1e8
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,254 +0,0 @@
using System;
using System.Collections.Generic;
using System.Text;
using UnityEngine;
using UnityEngine.LowLevel;
namespace WI
{
public static partial class PlayerLoopInterface
{
private static List<PlayerLoopSystem> insertedSystems = new();
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.AfterAssembliesLoaded)]
private static void Initialize()
{
PlayerLoopQuitChecker.GameQuitCallback += () =>
{
foreach (var playerLoopSystem in insertedSystems)
TryRemoveSystem(playerLoopSystem.type);
insertedSystems.Clear();
};
Hooker.Initialize();
}
private enum InsertType
{
Before,
After
}
public static void InsertSystemAfter(Type newSystemMarker, PlayerLoopSystem.UpdateFunction newSystemUpdate, Type insertAfter)
{
var playerLoopSystem = new PlayerLoopSystem { type = newSystemMarker, updateDelegate = newSystemUpdate };
InsertSystemAfter(playerLoopSystem, insertAfter);
}
public static void InsertSystemBefore(Type newSystemMarker, PlayerLoopSystem.UpdateFunction newSystemUpdate, Type insertBefore)
{
var playerLoopSystem = new PlayerLoopSystem { type = newSystemMarker, updateDelegate = newSystemUpdate };
InsertSystemBefore(playerLoopSystem, insertBefore);
}
public static void InsertSystemAfter(PlayerLoopSystem toInsert, Type insertAfter)
{
if (toInsert.type == null)
throw new ArgumentException("The inserted player loop system must have a marker type!", nameof(toInsert.type));
if (toInsert.updateDelegate == null)
throw new ArgumentException("The inserted player loop system must have an update delegate!", nameof(toInsert.updateDelegate));
if (insertAfter == null)
throw new ArgumentNullException(nameof(insertAfter));
var rootSystem = PlayerLoop.GetCurrentPlayerLoop();
InsertSystem(ref rootSystem, toInsert, insertAfter, InsertType.After, out var couldInsert);
if (!couldInsert)
{
throw new ArgumentException($"When trying to insert the type {toInsert.type.Name} into the player loop after {insertAfter.Name}, " +
$"{insertAfter.Name} could not be found in the current player loop!");
}
insertedSystems.Add(toInsert);
PlayerLoop.SetPlayerLoop(rootSystem);
}
public static void InsertSystemBefore(PlayerLoopSystem toInsert, Type insertBefore)
{
if (toInsert.type == null)
throw new ArgumentException("The inserted player loop system must have a marker type!", nameof(toInsert.type));
if (toInsert.updateDelegate == null)
throw new ArgumentException("The inserted player loop system must have an update delegate!", nameof(toInsert.updateDelegate));
if (insertBefore == null)
throw new ArgumentNullException(nameof(insertBefore));
var rootSystem = PlayerLoop.GetCurrentPlayerLoop();
InsertSystem(ref rootSystem, toInsert, insertBefore, InsertType.Before, out var couldInsert);
if (!couldInsert)
{
throw new ArgumentException($"When trying to insert the type {toInsert.type.Name} into the player loop before {insertBefore.Name}, " +
$"{insertBefore.Name} could not be found in the current player loop!");
}
insertedSystems.Add(toInsert);
PlayerLoop.SetPlayerLoop(rootSystem);
}
public static bool TryRemoveSystem(Type type)
{
if (type == null)
throw new ArgumentNullException(nameof(type), "Trying to remove a null type!");
var currentSystem = PlayerLoop.GetCurrentPlayerLoop();
var couldRemove = TryRemoveTypeFrom(ref currentSystem, type);
PlayerLoop.SetPlayerLoop(currentSystem);
return couldRemove;
}
private static bool TryRemoveTypeFrom(ref PlayerLoopSystem currentSystem, Type type)
{
var subSystems = currentSystem.subSystemList;
if (subSystems == null)
return false;
for (int i = 0; i < subSystems.Length; i++)
{
if (subSystems[i].type == type)
{
var newSubSystems = new PlayerLoopSystem[subSystems.Length - 1];
Array.Copy(subSystems, newSubSystems, i);
Array.Copy(subSystems, i + 1, newSubSystems, i, subSystems.Length - i - 1);
currentSystem.subSystemList = newSubSystems;
return true;
}
if (TryRemoveTypeFrom(ref subSystems[i], type))
return true;
}
return false;
}
public static PlayerLoopSystem CopySystem(PlayerLoopSystem system)
{
// PlayerLoopSystem is a struct.
var copy = system;
// but the sub system list is an array.
if (system.subSystemList != null)
{
copy.subSystemList = new PlayerLoopSystem[system.subSystemList.Length];
for (int i = 0; i < copy.subSystemList.Length; i++)
{
copy.subSystemList[i] = CopySystem(system.subSystemList[i]);
}
}
return copy;
}
private static void InsertSystem(ref PlayerLoopSystem currentLoopRecursive, PlayerLoopSystem toInsert, Type insertTarget, InsertType insertType,
out bool couldInsert)
{
var currentSubSystems = currentLoopRecursive.subSystemList;
if (currentSubSystems == null)
{
couldInsert = false;
return;
}
int indexOfTarget = -1;
for (int i = 0; i < currentSubSystems.Length; i++)
{
if (currentSubSystems[i].type == insertTarget)
{
indexOfTarget = i;
break;
}
}
if (indexOfTarget != -1)
{
var newSubSystems = new PlayerLoopSystem[currentSubSystems.Length + 1];
var insertIndex = insertType == InsertType.Before ? indexOfTarget : indexOfTarget + 1;
for (int i = 0; i < newSubSystems.Length; i++)
{
if (i < insertIndex)
newSubSystems[i] = currentSubSystems[i];
else if (i == insertIndex)
{
newSubSystems[i] = toInsert;
}
else
{
newSubSystems[i] = currentSubSystems[i - 1];
}
}
couldInsert = true;
currentLoopRecursive.subSystemList = newSubSystems;
}
else
{
for (var i = 0; i < currentSubSystems.Length; i++)
{
var subSystem = currentSubSystems[i];
InsertSystem(ref subSystem, toInsert, insertTarget, insertType, out var couldInsertInInner);
if (couldInsertInInner)
{
currentSubSystems[i] = subSystem;
couldInsert = true;
return;
}
}
couldInsert = false;
}
}
public static string CurrentLoopToString()
{
return PrintSystemToString(PlayerLoop.GetCurrentPlayerLoop());
}
private static string PrintSystemToString(PlayerLoopSystem s)
{
List<(PlayerLoopSystem, int)> systems = new();
AddRecursively(s, 0);
void AddRecursively(PlayerLoopSystem system, int depth)
{
systems.Add((system, depth));
if (system.subSystemList != null)
foreach (var subsystem in system.subSystemList)
AddRecursively(subsystem, depth + 1);
}
StringBuilder sb = new();
sb.AppendLine("Systems");
sb.AppendLine("=======");
foreach (var (system, depth) in systems)
{
// root system has a null type, all others has a marker type.
Append($"System Type: {system.type?.Name ?? "NULL"}");
// This is a C# delegate, so it's only set for functions created on the C# side.
Append($"Delegate: {system.updateDelegate}");
// This is a pointer, probably to the function getting run internally. Has long values (like 140700263204024) for the builtin ones concrete ones,
// while the builtin grouping functions has 0. So UnityEngine.PlayerLoop.Update has 0, while UnityEngine.PlayerLoop.Update.ScriptRunBehaviourUpdate
// has a concrete value.
Append($"Update Function: {system.updateFunction}");
// The loopConditionFunction seems to be a red herring. It's set to a value for only UnityEngine.PlayerLoop.FixedUpdate, but setting a different
// system to have the same loop condition function doesn't seem to do anything
Append($"Loop Condition Function: {system.loopConditionFunction}");
// null rather than an empty array when it's empty.
Append($"{system.subSystemList?.Length ?? 0} subsystems");
void Append(string s)
{
for (int i = 0; i < depth; i++)
sb.Append(" ");
sb.AppendLine(s);
}
}
return sb.ToString();
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 2a4617bab9c61ea478ad2994285e9d23
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,28 +0,0 @@
using System;
using UnityEngine;
using Object = UnityEngine.Object;
public static partial class PlayerLoopQuitChecker
{
public static event Action GameQuitCallback;
[RuntimeInitializeOnLoadMethod]
static void Initialize()
{
var quitCheckContainer = new GameObject("[Quit Checker]")
{
hideFlags = HideFlags.HideAndDontSave
};
quitCheckContainer.AddComponent<QuitCheckerRunner>();
Object.DontDestroyOnLoad(quitCheckContainer);
}
private partial class QuitCheckerRunner : MonoBehaviour
{
private void OnApplicationQuit()
{
GameQuitCallback?.Invoke();
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: b6b5fb8d2d047894bbd8adc8cc2aa65b
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

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

View File

@@ -1,43 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using System.Reflection;
using UnityEngine;
using WI;
namespace WI.Test
{
public class BindingTester : MonoBehaviour
{
public int value1;
public float value2;
public string value3;
public Vector3 value4;
private void Awake()
{
FieldBinder.Regist(this).Binding(nameof(value1), ChangeEvent1);
FieldBinder.Regist(this).Binding(nameof(value2), ChangeEvent2);
FieldBinder.Regist(this).Binding(nameof(value3), ChangeEvent3);
FieldBinder.Regist(this).Binding(nameof(value4), ChangeEvent4);
}
void ChangeEvent4()
{
Debug.Log("Vector3 field Changed");
}
void ChangeEvent3()
{
Debug.Log("string field Change");
}
void ChangeEvent1()
{
Debug.Log("Int Field Change");
}
void ChangeEvent2()
{
Debug.Log("float field Change");
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 1be3c28b0e0dc59479ec96d6a6e64e7a
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

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

View File

@@ -1,7 +0,0 @@
namespace WI
{
public interface IHotkeyAction
{
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 6f668c70c58cc8742a44c04ff695fa31
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,21 +0,0 @@
using UnityEngine;
namespace WI
{
public interface IKeyboardActor
{
//public void GetKey(KeyCode key);
}
public interface IGetKeyDown : IKeyboardActor
{
void GetKeyDown(KeyCode code);
}
public interface IGetKey : IKeyboardActor
{
void GetKey(KeyCode code);
}
public interface IGetKeyUp : IKeyboardActor
{
void GetKeyUp(KeyCode code);
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 5d0b7025425e6714589048c4fc382a04
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,8 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public interface IOptionable
{
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 5613bf27161a5e148a07539801c9136f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,6 +0,0 @@
namespace WI
{
public interface ISingle { }
public interface ISingleChild : ISingle { }
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 0430d13b31a7d484ba99149390a7e19b
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

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

View File

@@ -1,27 +0,0 @@
using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using static UnityEngine.UI.Button;
namespace WI
{
public static class ButtonExtension
{
public delegate void CustomAction();
public delegate void CustomAction<T>(List<T> values);
}
public static class ScrollRectExtension
{
public static void Clear(this ScrollRect rect)
{
var childCount = rect.content.transform.childCount;
for(int i =0;i<childCount;++i)
{
GameObject.DestroyImmediate(rect.content.transform.GetChild(0).gameObject);
}
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 81cdeaa8efd4e2d439f243745c96f72a
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,11 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
namespace WI
{
public abstract class CanvasBase : UIBase, ISingle
{
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: fd7b108b54890e449a6d5e76077d125e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,30 +0,0 @@
using System;
using UnityEngine.UI;
using static UnityEngine.UI.Button;
namespace WI
{
public abstract class PanelBase : UIBase
{
}
public static class PanelBaseExtension
{
public static void SetActive(this PanelBase[] pbs, bool value)
{
foreach(var p in pbs)
{
p.SetActive(value);
}
}
public static void SetActive(this PanelBase[] pbs, bool value, int count)
{
for (int i = 0; i < count; ++i)
{
pbs[i].SetActive(value);
}
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 75a2d50f89d57f344a0664a3b1f72142
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,30 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;
using UnityEngine.EventSystems;
namespace WI
{
public abstract class UIBase : MonoBehaviour
{
public RectTransform rectTransform => GetComponent<RectTransform>();
public event Action<UIBase> onEnableEvent;
public event Action<UIBase> onDisableEvent;
public void SetActive(bool value)
{
if (value)
{
onEnableEvent?.Invoke(this);
}
else
{
onDisableEvent?.Invoke(this);
}
gameObject.SetActive(value);
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: cd08d05d1c8a53644a9e41f4a7e1a0b3
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,10 +0,0 @@
using System.Collections.Generic;
using UnityEngine;
using WI;
[CreateAssetMenu(fileName = "UIOption", menuName = "UIOption", order = 0)]
public class UIOption : ScriptableObject
{
public SDictionary<string, string> options = new();
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: fc358a0e610272141b3325d2426929e8
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,223 +0,0 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using TMPro;
using UnityEditor;
using UnityEngine;
using UnityEngine.EventSystems;
using WI;
#if UNITY_EDITOR
public class UISettingHelper : Editor
{
[MenuItem("Tools/UIClassGenerate")]
public static void UIClassGenerate()
{
Canvas[] canvases = GameObject.FindObjectsOfType<Canvas>();
string defalutUsing = "using UnityEngine;\nusing UnityEngine.UI;\nusing WI;\n\n";
string defalutNameSpace = "namespace XED\n{\n";
foreach (Canvas canvas in canvases)
{
string canvasPath;
string canvasFileName = canvas.gameObject.name + ".cs";
canvasPath = Path.Combine("Assets/Scripts/UI", canvasFileName);
var childs = canvas.GetComponentsInChildren<Transform>();
List<string> childPanels = new List<string>();
Dictionary<string, int> dupleCount = new Dictionary<string, int>();
foreach (var c in childs)
{
if (c.name.Split('_')[0] != "Panel")
continue;
childPanels.Add(c.gameObject.name);
if (c.TryGetComponent<PanelBase>(out var tb))
continue;
string panelName = c.gameObject.name + ".cs";
string panelPath = Path.Combine("Assets/Scripts/UI", panelName);
var uiElements = c.FindAll<UIBehaviour>();
using FileStream fs = File.Create(panelPath);
using StreamWriter writer = new StreamWriter(fs);
writer.Write(defalutUsing);
writer.Write(defalutNameSpace);
writer.WriteLine($"\tinternal class {c.gameObject.name} : PanelBase");
writer.WriteLine("\t{");
Dictionary<string, List<string>> nameTable = new Dictionary<string, List<string>>();
foreach (var e in uiElements)
{
var eType = e.GetType();
string eName;
if (eType == typeof(TextMeshProUGUI))
eName = "text";
else
eName = eType.Name;
if (e.name.Contains('_'))
eName += $"_{e.name.Split('_').Last()}";
else
{
eName += $"_{e.transform.parent.name.Split('_').Last()}";
}
eName = eName.Replace(" ", "");
//writer.WriteLine($"\t\tpublic {eType} {eName.ToLower()};");
if (!nameTable.ContainsKey(eType.FullName))
nameTable.Add(eType.FullName, new());
if (!dupleCount.ContainsKey(eName))
dupleCount.Add(eName, 0);
dupleCount[eName]++;
if (nameTable[eType.FullName].Contains(eName))
{
eName += dupleCount[eName];
}
nameTable[eType.FullName].Add(eName);
}
foreach (var nt in nameTable)
{
var temp = nt.Value.OrderBy(a => a.Length);
foreach (var en in temp)
{
writer.WriteLine($"\t\tpublic {nt.Key} {en.ToLower()};");
}
writer.WriteLine();
}
writer.WriteLine("\t}");
writer.Write("}");
}
if (canvas.TryGetComponent<CanvasBase>(out var cb))
continue;
using (FileStream fs = File.Open(canvasPath, FileMode.OpenOrCreate))
{
using StreamWriter writer = new StreamWriter(fs);
writer.Write(defalutUsing);
writer.Write(defalutNameSpace);
writer.WriteLine($"\tpublic class {canvas.gameObject.name} : CanvasBase");
writer.WriteLine("\t{");
foreach (var cp in childPanels)
{
writer.WriteLine($"\t\t{cp} {cp.ToLower()};");
}
writer.WriteLine("\t}");
writer.WriteLine("}");
}
//Debug.Log(canvas.gameObject);
}
AssetDatabase.Refresh();
}
[MenuItem("Tools/UIClassAttach")]
public static void UIClassAttach()
{
var assemblies = AppDomain.CurrentDomain.GetAssemblies();
Canvas[] canvases = GameObject.FindObjectsOfType<Canvas>();
foreach (var canvas in canvases)
{
var canvasName = canvas.gameObject.name;
var canvasClassType = assemblies.SelectMany(a => a.GetTypes())
.FirstOrDefault(t => t.Name == canvasName);
if (canvasClassType == null)
{
continue;
}
canvas.transform.GetOrAddComponent(canvasClassType);
var childPanels = canvas.transform.FindAll<RectTransform>().Where(cr => cr.name.Split('_')[0] == "Panel");
foreach (var panel in childPanels)
{
var panelName = panel.gameObject.name;
var panelClassType = assemblies.SelectMany(a => a.GetTypes())
.FirstOrDefault(t => t.Name == panelName);
if (panelClassType == null)
continue;
panel.transform.GetOrAddComponent(panelClassType);
}
}
}
[MenuItem("Tools/UI HoverText File Generate")]
static void UIHoverTextFileGenerate()
{
// 1. PanelBase를 상속받은 모든 클래스 검색
var panelClasses = AppDomain.CurrentDomain.GetAssemblies()
.SelectMany(a => a.GetTypes())
.Where(t => t.IsSubclassOf(typeof(PanelBase)));
// 2. Resources/language에 ko.txt 열기
string filePath = "Assets/Resources/language/ko.txt";
if (!File.Exists(filePath))
{
File.Create(filePath).Dispose();
}
// 3. 열린 파일의 모든 줄 읽기
Dictionary<string, string> hoverTexts = new Dictionary<string, string>();
using (StreamReader reader = new StreamReader(filePath))
{
string line;
while ((line = reader.ReadLine()) != null)
{
// 각 줄은 다음의 구조를 가지고 있음: $"{UIBehaviour.gameObject.name}:anyText"
string[] parts = line.Split(':');
if (parts.Length == 2)
{
string gameObjectName = parts[0];
string hoverText = parts[1];
hoverTexts.Add(gameObjectName, hoverText);
}
}
}
// 4. 이어서 UIBehaviour.gameObject.name과 anyText로 Dictionary를 생성
foreach (Type panelClass in panelClasses)
{
// 5. 해당 PanelBase의 멤버 변수들 중에서 UIBehaviour를 선별
var uiBehaviours = panelClass.GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic)
.Where(f => typeof(UIBehaviour).IsAssignableFrom(f.FieldType));
foreach (var uiBehaviour in uiBehaviours)
{
string gameObjectName = uiBehaviour.Name.ToLower();
string hoverText = "";
// 6. Dictionary에 UIBehaviour의 이름이 존재하지 않는다면 추가
if (!hoverTexts.ContainsKey(gameObjectName))
{
hoverTexts.Add(gameObjectName, hoverText);
}
}
}
var orderd = hoverTexts.OrderBy(p => p.Key);
// 7. 열린 파일에 입력
using (StreamWriter writer = new StreamWriter(filePath,false, System.Text.Encoding.UTF8))
{
foreach (var hoverText in orderd)
{
writer.WriteLine($"{hoverText.Key}:{hoverText.Value}");
}
}
AssetDatabase.Refresh();
}
}
#endif

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: ad46ddab56d4de143806d043fd2694bc
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

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

View File

@@ -1,21 +0,0 @@
using System;
using System.Collections.Generic;
using UnityEngine;
namespace WI
{
[Serializable]
public partial class Container<T> where T : Component
{
public List<T> values = new List<T>();
public void Loading(IEnumerable<Component> loads)
{
foreach (var l in loads)
{
if (l is T t)
values.Add(t);
}
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 31cfb27f414a08b42a89cb0ed7cb29be
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 55b68a64773b3774f95802313db663c8
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,24 +0,0 @@
using static UnityEngine.GraphicsBuffer;
using UnityEditor;
using System;
using System.Reflection;
using System.Linq;
#if UNITY_EDITOR
namespace WI
{
public class EditorUtil
{
public static int DrawSubclassDropdown(string label, Type target, int selectedIndex)
{
var subclass = Assembly
.GetAssembly(target)
.GetTypes()
.Where(t => t.IsSubclassOf(target))
.Select(t2 => t2.Name).Append(target.Name).ToArray();
return EditorGUILayout.Popup(label, selectedIndex, subclass);
}
}
}
#endif

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 90279b59eabde62429020d873d117787
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,23 +0,0 @@
using System;
using System.Reflection;
namespace WI
{
public static partial class ReflectionExtend
{
public static FieldInfo GetAllField(this Type target, string name)
{
return target.GetField(name, BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public);
}
public static FieldInfo[] GetAllFields(this Type target)
{
return target.GetFields(BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public);
}
public static PropertyInfo[] GetAllProperties(this Type target)
{
return target.GetProperties(BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public);
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 7becfe838c69c094ebc987aba4958283
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,106 +0,0 @@
using System.Collections.Generic;
using UnityEngine;
namespace WI
{
[System.Serializable]
public struct SKeyValuePair<T, T2>
{
[SerializeField] public T Key;
[SerializeField] public T2 Value;
public SKeyValuePair(T key, T2 value)
{
Key = key;
Value = value;
}
}
/// <summary>
/// SerializeDictionary For Unity
/// </summary>
[System.Serializable]
public partial class SDictionary<T, T2> : Dictionary<T, T2>
{
[SerializeField] public List<SKeyValuePair<T, T2>> datas = new List<SKeyValuePair<T, T2>>();
public SDictionary()
{
foreach (var d in datas)
{
Add(d.Key, d.Value);
}
}
void Refresh()
{
if (base.Count == datas.Count)
return;
foreach (var d in datas)
{
base.TryAdd(d.Key, d.Value);
}
}
public new T2 this[T key]
{
get
{
Refresh();
return base[key];
}
set
{
for (int i = 0; i < datas.Count; ++i)
{
var currentData = datas[i];
var ck = currentData.Key;
if (ck.Equals(key))
datas.RemoveAt(i);
}
datas.Add(new SKeyValuePair<T, T2>(key, value));
base[key] = value;
}
}
public bool Add(in T key, in T2 value)
{
if (base.ContainsKey(key))
return false;
base.Add(key, value);
datas.Add(new SKeyValuePair<T, T2>(key, value));
return true;
}
public bool Remove(in T key)
{
if (!base.ContainsKey(key))
return false;
for (int i = 0; i < datas.Count; ++i)
{
if (datas[i].Key.Equals(key))
{
datas.RemoveAt(i);
base.Remove(key);
return true;
}
}
return false;
}
public new void Clear()
{
base.Clear();
datas.Clear();
}
public bool TryGetValue(in T key, out T2 value)
{
Refresh();
return base.TryGetValue(key, out value);
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: b662546762d5c3a428a8c061af95d1ac
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,49 +0,0 @@
using UnityEngine;
using UnityEditor;
using System.Collections.Generic;
using UnityEngine.SceneManagement; //3
namespace WI
{
#if UNITY_EDITOR
public class SelectGameObjectsWithMissingScripts : Editor
{
[MenuItem("Tools/WPAG Utilities/Select GameObjects With Missing Scripts")]
static void SelectGameObjects()
{
//Get the current scene and all top-level GameObjects in the scene hierarchy
Scene currentScene = UnityEngine.SceneManagement.SceneManager.GetActiveScene();
GameObject[] rootObjects = currentScene.GetRootGameObjects();
List<Object> objectsWithDeadLinks = new List<Object>();
foreach (GameObject g in rootObjects)
{
//Get all components on the GameObject, then loop through them
Component[] components = g.GetComponents<Component>();
for (int i = 0; i < components.Length; i++)
{
Component currentComponent = components[i];
//If the component is null, that means it's a missing script!
if (currentComponent == null)
{
//Add the sinner to our naughty-list
objectsWithDeadLinks.Add(g);
Selection.activeGameObject = g;
Debug.Log(g + " has a missing script!");
break;
}
}
}
if (objectsWithDeadLinks.Count > 0)
{
//Set the selection in the editor
Selection.objects = objectsWithDeadLinks.ToArray();
}
else
{
Debug.Log("No GameObjects in '" + currentScene.name + "' have missing scripts! Yay!");
}
}
}
#endif
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 7bcae29630d042f4187a2232b53469c0
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,24 +0,0 @@
using UnityEditor;
using UnityEngine;
namespace WI
{
public static class Wathf
{
/// <summary>
/// 1.618 : 1 = x : y
/// ex) standard = 3
/// result[0] = f(x==standard)
/// result[1] = f(y==standard)
/// </summary>
/// <param name="standard"></param>
/// <param name="result"></param>
public static void GoldenRatio(float standard, out float[] result)
{
result = new float[2];
result[0] = standard * 1.618f;
result[1] = standard * 0.618f;
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 751606caaaf29eb48a4d11fe8079241e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,306 +0,0 @@
using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
namespace WI
{
public static partial class Wtil
{
#if UNITY_EDITOR
public static bool GetCurrentSelectGameObject(out GameObject obj)
{
obj = Selection.activeGameObject;
if (obj == null)
return false;
return true;
}
#endif
public static bool isScreenOver(this Camera cam, Vector3 pos)
{
var viewPos = cam.WorldToViewportPoint(pos);
return viewPos.z < 0 || (viewPos.x < 0 || viewPos.x > 1) || (viewPos.y < 0 || viewPos.y > 1);
}
public static void AddLayer(this Camera cam, int layer)
{
cam.cullingMask |= 1 << layer;
}
public static bool Overlaps(this RectTransform rectTrans1, RectTransform rectTrans2)
{
var rect1 = new Rect(rectTrans1.localPosition.x, rectTrans1.localPosition.y, rectTrans1.rect.width, rectTrans1.rect.height);
var rect2 = new Rect(rectTrans2.localPosition.x, rectTrans2.localPosition.y, rectTrans2.rect.width, rectTrans2.rect.height);
return rect1.Overlaps(rect2);
}
public static void RemoveLayer(this Camera cam, int layer)
{
cam.cullingMask &= ~(1 << layer);
}
public static void NullCleaning<T, T2>(this Dictionary<T, T2> table)
{
var keys = table.Keys;
foreach (var k in keys)
{
if (k == null)
{
table.Remove(k);
continue;
}
if (table[k] == null)
{
table.Remove(k);
}
}
}
public static void FindAll<T>(this Transform root, ref List<T> container)
{
if (root.TryGetComponents<T>(out var value))
{
container.AddRange(value);
}
var childCount = root.childCount;
for (int i = 0; i < childCount; ++i)
{
FindAll(root.GetChild(i), ref container);
}
}
public static List<T> FindAll<T>(this MonoBehaviour root)
{
List<T> result = new List<T>();
if (root.transform.TryGetComponents<T>(out var value))
{
result.AddRange(value);
}
var childCount = root.transform.childCount;
for (int i = 0; i < childCount; ++i)
{
var childComponents = FindAll<T>(root.GetChild(i));
result.AddRange(childComponents);
}
return result;
}
static Transform GetChild(this MonoBehaviour root, int index)
{
return root.transform.GetChild(index);
}
public static List<T> FindAll<T>(this Transform root)
{
List<T> result = new List<T>();
if (root.TryGetComponents<T>(out var value))
{
result.AddRange(value);
}
var childCount = root.childCount;
for (int i = 0; i < childCount; ++i)
{
var childComponents = FindAll<T>(root.GetChild(i));
result.AddRange(childComponents);
}
return result;
}
public static bool Add<T>(this HashSet<T> hash, T[] values)
{
bool result = true;
for(int i = 0; i < values.Length; ++i)
{
result = hash.Add(values[i]);
}
return result;
}
public static T Find<T>(this Transform root, string name) where T : Component
{
T result = default;
int count = root.childCount;
for(int i =0;i<count;++i)
{
var child = root.GetChild(i);
if (child.TryGetComponent<T>(out result))
{
if(result.name == name)
{
return result;
}
}
result = child.Find<T>(name);
if(result!=null)
{
break;
}
}
return result;
}
public static T Find<T>(this Transform root) where T : Component
{
T result = default;
if (root.Find<T>(ref result))
{
return result;
}
return result;
}
public static List<Transform> GetParents(this Transform root)
{
List<Transform> result = new List<Transform>();
var parent = root.parent;
while (parent != null)
{
result.Add(parent);
parent = parent.parent;
}
return result;
}
/// <summary>
/// T 가 나올때 까지 자식오브젝트를 순회한다. 여러개가 있다면 가장 먼저 발견된 것을 ref 로 내보낸다.
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="root"></param>
/// <param name="result"></param>
/// <returns></returns>
public static bool Find<T>(this Transform root, ref T result) where T : Component
{
if (root.TryGetComponent<T>(out result))
{
return true;
}
var childCount = root.transform.childCount;
for (int i = 0; i < childCount; ++i)
{
if (root.GetChild(i).Find<T>(ref result))
return true;
}
return false;
}
public static bool TryGetComponents<T>(this Transform root, out T[] result)
{
result = root.GetComponents<T>();
return result.Length > 0;
}
public static T2[] ArrayConvertor<T, T2>(T[] origin) where T : MonoBehaviour where T2 : MonoBehaviour
{
T2[] result = new T2[origin.Length];
for (int i = 0; i < result.Length; ++i)
{
result[i] = origin[i] as T2;
}
return result;
}
public static void AddFlag<TEnum>(this ref TEnum currentValue, TEnum flagToAdd) where TEnum : struct, Enum
{
// currentValue와 flagToAdd가 같은 Enum 타입인지 확인합니다.
if (!typeof(TEnum).IsEnum)
{
throw new ArgumentException("TEnum must be an enumerated type.");
}
// currentValue와 flagToAdd를 숫자형식으로 변환한 후 OR 연산합니다.
int currentValueInt = Convert.ToInt32(currentValue);
int flagToAddInt = Convert.ToInt32(flagToAdd);
int resultInt = currentValueInt | flagToAddInt;
// OR 연산 결과를 Enum 타입으로 변환하여 currentValue 매개변수에 할당합니다.
currentValue = (TEnum)Enum.ToObject(typeof(TEnum), resultInt);
}
public static void RemoveFlag<TEnum>(this ref TEnum currentValue, TEnum flagToAdd) where TEnum : struct, Enum
{
// currentValue와 flagToAdd가 같은 Enum 타입인지 확인합니다.
if (!typeof(TEnum).IsEnum)
{
throw new ArgumentException("TEnum must be an enumerated type.");
}
// currentValue와 flagToAdd를 숫자형식으로 변환한 후 OR 연산합니다.
int currentValueInt = Convert.ToInt32(currentValue);
int flagToAddInt = Convert.ToInt32(flagToAdd);
int resultInt = currentValueInt & ~flagToAddInt;
// OR 연산 결과를 Enum 타입으로 변환하여 currentValue 매개변수에 할당합니다.
currentValue = (TEnum)Enum.ToObject(typeof(TEnum), resultInt);
}
public static Component GetOrAddComponent(this Transform mono, Type type)
{
if (mono.TryGetComponent(type, out var result))
{
return result;
}
return mono.gameObject.AddComponent(type);
}
public static T GetOrAddComponent<T>(this Transform mono) where T : Component
{
if (mono.TryGetComponent<T>(out T result))
{
return result;
}
return mono.gameObject.AddComponent<T>();
}
public static T GetOrAddComponent<T>(this GameObject mono) where T : Component
{
if (mono.TryGetComponent<T>(out T result))
{
return result;
}
return mono.gameObject.AddComponent<T>();
}
static Dictionary<Component, MeshRenderer[]> meshGroupCache = new();
public static Vector3 GetMeshGroupCenter(this Component root)
{
if (!meshGroupCache.TryGetValue(root, out _))
{
meshGroupCache.Add(root, root.GetComponentsInChildren<MeshRenderer>());
}
var meshs = meshGroupCache[root];
Vector3 total = Vector3.zero;
foreach (var m in meshs)
{
total += m.bounds.center;
}
return total / meshs.Length;
}
public static Vector3 GetMeshGroupCenter(MeshRenderer[] meshGroup)
{
Vector3 total = Vector3.zero;
foreach (var m in meshGroup)
{
total += m.bounds.center;
}
return total / meshGroup.Length;
}
public static bool StringToEnum<T>(string value, out T result)
{
result = default;
if (!Enum.TryParse(typeof(T), value, out var parse))
return false;
result = (T)parse;
return true;
}
public static T GetComponentFromParent<T>(this Transform root) where T : Component
{
var parent = root.parent;
while (parent != null)
{
if (parent.TryGetComponent<T>(out var result))
{
return result;
}
parent = parent.parent;
}
return null;
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: f3a00520bc61c9044890b8f8187d7553
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,16 +0,0 @@
{
"name": "WI",
"rootNamespace": "",
"references": [
"GUID:6055be8ebefd69e48b49212b09b47b2f"
],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}

View File

@@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: e9cf219e3a76a654c9ef99d872082205
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: be9c16eac5c30f04f89dc4b1449fe6d6 guid: 7483fa257ebd81244873365cb6a5f868
folderAsset: yes folderAsset: yes
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: d1485f419e8a7d64fb5ea287f3f6e659 guid: d80c03e1cbf6c8443bb4dfbc581538ce
folderAsset: yes folderAsset: yes
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: fe835bab5f3bc7c42b794b9bc04af4ac guid: 799c2069644c8c74dbb64b333413a887
TextScriptImporter: TextScriptImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@@ -0,0 +1,57 @@
[
{
"groupcd": "W10",
"groupnm": "생산라인",
"mchcnt": 25,
"planqty": 38155,
"workqty": 5354,
"goodqty": 5344,
"badqty": 10,
"badrate": "0.2",
"progressrate": 14
},
{
"groupcd": "W20",
"groupnm": "조립라인",
"mchcnt": 12,
"planqty": 30025,
"workqty": 5260,
"goodqty": 5257,
"badqty": 3,
"badrate": "0.1",
"progressrate": 17.5
},
{
"groupcd": "W30",
"groupnm": "최종검사",
"mchcnt": 5,
"planqty": 22378,
"workqty": 946,
"goodqty": 946,
"badqty": 0,
"badrate": "0.0",
"progressrate": 4.2
},
{
"groupcd": "W40",
"groupnm": "조립라인(가공)",
"mchcnt": 1,
"planqty": 3000,
"workqty": 0,
"goodqty": 0,
"badqty": 0,
"badrate": "0.0",
"progressrate": 0
},
{
"groupcd": "W50",
"groupnm": "금형부",
"mchcnt": 0,
"planqty": 0,
"workqty": 0,
"goodqty": 0,
"badqty": 0,
"badrate": "0.0",
"progressrate": 0
}
]

View File

@@ -1,6 +1,6 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: e0e30dbfb835e694e81159517a269cf7 guid: 08eb6f4f54e3dd845be3ed1dfdaf3226
PrefabImporter: TextScriptImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:

View File

@@ -1,68 +0,0 @@
{
"status": 200,
"code": "SUCCESS",
"message": "Searched list successfully",
"data": {
"count": 492,
"rows": [
{
"result": "_result",
"table": 0,
"_start": "2025-01-10T00:00:00Z",
"_stop": "2025-02-20T00:00:00Z",
"_time": "2025-02-16T23:02:34Z",
"DAYNIGHT": "1",
"ITEMCD": "24295087-1",
"MCHCD": "IJ01",
"MOLDCD": "24295087-1",
"MOLDSEQ": "5",
"WO": "WO202502170014",
"_measurement": "MCHEGI_IX01",
"C027": 0,
"C037": 13.21,
"C045": 87.18,
"C046": 58.02,
"CYCLETIME": 85
},
{
"result": "_result",
"table": 0,
"_start": "2025-01-10T00:00:00Z",
"_stop": "2025-02-20T00:00:00Z",
"_time": "2025-02-16T23:03:34Z",
"DAYNIGHT": "1",
"ITEMCD": "24295087-1",
"MCHCD": "IJ01",
"MOLDCD": "24295087-1",
"MOLDSEQ": "5",
"WO": "WO202502170014",
"_measurement": "MCHEGI_IX01",
"C027": 10,
"C037": 11.03,
"C045": 85.4,
"C046": 58.02,
"CYCLETIME": 85
},
{
"result": "_result",
"table": 0,
"_start": "2025-01-10T00:00:00Z",
"_stop": "2025-02-20T00:00:00Z",
"_time": "2025-02-16T23:05:34Z",
"DAYNIGHT": "1",
"ITEMCD": "24295087-1",
"MCHCD": "IJ01",
"MOLDCD": "24295087-1",
"MOLDSEQ": "5",
"WO": "WO202502170014",
"_measurement": "MCHEGI_IX01",
"C027": 10,
"C037": 10.88,
"C045": 85.4,
"C046": 58.02,
"CYCLETIME": 85
}
]
},
"remark": null
}

View File

@@ -1,104 +1,5 @@
%YAML 1.1 %YAML 1.1
%TAG !u! tag:unity3d.com,2011: %TAG !u! tag:unity3d.com,2011:
--- !u!1 &1571438068040124615
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4924352824083599501}
- component: {fileID: 9216871233697501255}
- component: {fileID: 2534438156133673795}
- component: {fileID: 677640495207846771}
m_Layer: 5
m_Name: Image_Loading
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4924352824083599501
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1571438068040124615}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 6437711290899480737}
m_Father: {fileID: 5290342058106165413}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 150, y: 150}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &9216871233697501255
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1571438068040124615}
m_CullTransparentMesh: 1
--- !u!114 &2534438156133673795
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1571438068040124615}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 1998993089, guid: 34ffe97dd380f31478630d3d8c999e88, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!95 &677640495207846771
Animator:
serializedVersion: 7
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1571438068040124615}
m_Enabled: 1
m_Avatar: {fileID: 0}
m_Controller: {fileID: 9100000, guid: e7e18e05adfe93544917101c0d6517bf, type: 2}
m_CullingMode: 0
m_UpdateMode: 0
m_ApplyRootMotion: 0
m_LinearVelocityBlending: 0
m_StabilizeFeet: 0
m_AnimatePhysics: 0
m_WarningMessage:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorStateOnDisable: 0
m_WriteDefaultValuesOnDisable: 0
--- !u!1 &2015586183705257098 --- !u!1 &2015586183705257098
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -112,7 +13,7 @@ GameObject:
- component: {fileID: 5141981565789514627} - component: {fileID: 5141981565789514627}
- component: {fileID: 992545556780851240} - component: {fileID: 992545556780851240}
m_Layer: 5 m_Layer: 5
m_Name: Panel_CompleteAlramHistory m_Name: AlarmHistoryPanel
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
@@ -139,7 +40,6 @@ RectTransform:
- {fileID: 39342483784098846} - {fileID: 39342483784098846}
- {fileID: 1433797947867383718} - {fileID: 1433797947867383718}
- {fileID: 1433342951933569684} - {fileID: 1433342951933569684}
- {fileID: 4924352824083599501}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1} m_AnchorMin: {x: 0, y: 1}
@@ -197,11 +97,9 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 33be8afee1eb62046a436e62f03e49ea, type: 3} m_Script: {fileID: 11500000, guid: 33be8afee1eb62046a436e62f03e49ea, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
prefab_completeTimeAlarmInfo: {fileID: 0} alarmInfoItem: {fileID: 0}
ScrollView_CompleteAlramHistory: {fileID: 0} ScrollView_AlramHistory: {fileID: 0}
Button_Close: {fileID: 0} Button_Close: {fileID: 0}
Image_Loading: {fileID: 0}
notCheckAlramList: []
--- !u!1 &2597700187815423966 --- !u!1 &2597700187815423966
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -215,7 +113,7 @@ GameObject:
- component: {fileID: 8249334818174337873} - component: {fileID: 8249334818174337873}
- component: {fileID: 7925548917684973952} - component: {fileID: 7925548917684973952}
m_Layer: 5 m_Layer: 5
m_Name: ScrollView_CompleteAlramHistory m_Name: ScrollView_AlramHistory
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
@@ -1126,142 +1024,6 @@ MonoBehaviour:
m_hasFontAssetChanged: 0 m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0} m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0} m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &7310732663478420249
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6437711290899480737}
- component: {fileID: 5055053793868880306}
- component: {fileID: 7745414950352808154}
m_Layer: 5
m_Name: Text (TMP)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6437711290899480737
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7310732663478420249}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 4924352824083599501}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 80, y: 20}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5055053793868880306
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7310732663478420249}
m_CullTransparentMesh: 1
--- !u!114 &7745414950352808154
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7310732663478420249}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: Loading..
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 73a8cbdb8d46fbb4bae58573ac247b09, type: 2}
m_sharedMaterial: {fileID: -2117747647215524922, guid: 73a8cbdb8d46fbb4bae58573ac247b09, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 18
m_fontSizeBase: 18
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_TextWrappingMode: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 0
m_ActiveFontFeatures: 6e72656b
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_EmojiFallbackSupport: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &7425014977777570991 --- !u!1 &7425014977777570991
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@@ -286,7 +286,7 @@ GameObject:
- component: {fileID: 2612720065609089850} - component: {fileID: 2612720065609089850}
- component: {fileID: 8199170409991035422} - component: {fileID: 8199170409991035422}
m_Layer: 5 m_Layer: 5
m_Name: PRF_UI_CompleteTimeAlramInfo m_Name: AlarmInfoItem
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0

View File

@@ -223,7 +223,6 @@ GameObject:
- component: {fileID: 7195701352792593841} - component: {fileID: 7195701352792593841}
- component: {fileID: 5661144198289626876} - component: {fileID: 5661144198289626876}
- component: {fileID: 49175498697250018} - component: {fileID: 49175498697250018}
- component: {fileID: 5672342424745622716}
- component: {fileID: 989938988083337684} - component: {fileID: 989938988083337684}
m_Layer: 5 m_Layer: 5
m_Name: FloorControlItem m_Name: FloorControlItem
@@ -335,21 +334,6 @@ MonoBehaviour:
m_OnClick: m_OnClick:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []
--- !u!114 &5672342424745622716
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6570512265235603834}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 83c05c408b4d8e141b50cc07cc82ebe1, type: 3}
m_Name:
m_EditorClassIdentifier:
value: 0
selectColor: {r: 0.07450981, g: 0.23529413, b: 0.54901963, a: 1}
originColor: {r: 0, g: 0, b: 0, a: 1}
--- !u!114 &989938988083337684 --- !u!114 &989938988083337684
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@@ -1577,7 +1577,7 @@ GameObject:
- component: {fileID: 4012190114791696601} - component: {fileID: 4012190114791696601}
- component: {fileID: 5995098772332754199} - component: {fileID: 5995098772332754199}
m_Layer: 0 m_Layer: 0
m_Name: PRF_UI_MachineKPI m_Name: MachineInfoItem
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0

View File

@@ -1,443 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &956277598518386385
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 350622071464353800}
- component: {fileID: 3666807232690463195}
- component: {fileID: 5596363837942949343}
m_Layer: 5
m_Name: SelectUI
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &350622071464353800
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 956277598518386385}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 5663509972648161664}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 22, y: 20}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &3666807232690463195
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 956277598518386385}
m_CullTransparentMesh: 1
--- !u!114 &5596363837942949343
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 956277598518386385}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: fb471200871e0b34797edccc1dad0279, type: 3}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 4
--- !u!1 &2902962825967427172
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6520105944163928002}
- component: {fileID: 5210010463140993914}
- component: {fileID: 3017080449125643136}
m_Layer: 5
m_Name: TodayUI
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6520105944163928002
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2902962825967427172}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 5663509972648161664}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 22, y: 20}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5210010463140993914
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2902962825967427172}
m_CullTransparentMesh: 1
--- !u!114 &3017080449125643136
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2902962825967427172}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.5943396, g: 0.5943396, b: 0.5943396, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: fb471200871e0b34797edccc1dad0279, type: 3}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 4
--- !u!1 &4341999869640149865
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5663509972648161664}
- component: {fileID: 8570022658130637124}
- component: {fileID: 1647909120811987127}
m_Layer: 5
m_Name: PRF_UI_CalendarItem
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5663509972648161664
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4341999869640149865}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 5982924998747772425}
- {fileID: 350622071464353800}
- {fileID: 6520105944163928002}
- {fileID: 3971906318255557200}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 30, y: 25}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &8570022658130637124
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4341999869640149865}
m_CullTransparentMesh: 1
--- !u!114 &1647909120811987127
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4341999869640149865}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 82f43be8f5583ee4c8d6f3ef1b8bb308, type: 3}
m_Name:
m_EditorClassIdentifier:
HoverUI: {fileID: 0}
SelectUI: {fileID: 0}
TodayUI: {fileID: 0}
Text_Day: {fileID: 0}
--- !u!1 &5206417122210567764
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5982924998747772425}
- component: {fileID: 3126620628418126379}
- component: {fileID: 1106112664917321319}
m_Layer: 5
m_Name: HoverUI
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5982924998747772425
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5206417122210567764}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 5663509972648161664}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 22, y: 20}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &3126620628418126379
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5206417122210567764}
m_CullTransparentMesh: 1
--- !u!114 &1106112664917321319
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5206417122210567764}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.9490197, g: 0.9490197, b: 0.9490197, a: 0.5882353}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: fb471200871e0b34797edccc1dad0279, type: 3}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 4
--- !u!1 &5325260341381955549
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3971906318255557200}
- component: {fileID: 7842981886742081832}
- component: {fileID: 1485027349162457672}
- component: {fileID: 6802495630742468521}
m_Layer: 5
m_Name: Text_Day
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &3971906318255557200
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5325260341381955549}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 5663509972648161664}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7842981886742081832
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5325260341381955549}
m_CullTransparentMesh: 1
--- !u!114 &1485027349162457672
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5325260341381955549}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: 30
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 9a2c7e704ad3e62438526dc8aecaeb56, type: 2}
m_sharedMaterial: {fileID: 682561501981441939, guid: 9a2c7e704ad3e62438526dc8aecaeb56, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 12
m_fontSizeBase: 12
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_TextWrappingMode: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_ActiveFontFeatures: 6e72656b
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_EmojiFallbackSupport: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!114 &6802495630742468521
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5325260341381955549}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
m_Name:
m_EditorClassIdentifier:
m_HorizontalFit: 2
m_VerticalFit: 2

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: b59b3195a2b1ed64ebe226010a38ae94
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -149,7 +149,7 @@ GameObject:
- component: {fileID: 4012190114791696601} - component: {fileID: 4012190114791696601}
- component: {fileID: 6115024543596245206} - component: {fileID: 6115024543596245206}
m_Layer: 0 m_Layer: 0
m_Name: PRF_UI_ThermostatIcon m_Name: ThermostatInfoItem
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
@@ -347,6 +347,7 @@ MonoBehaviour:
totm: totm:
moldcd: moldcd:
moldseq: moldseq:
rectTransform: {fileID: 0}
Default_KPI: {fileID: 0} Default_KPI: {fileID: 0}
isExpand: 0 isExpand: 0
isInteractable: 0 isInteractable: 0

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,10 +1,7 @@
using System; using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine; using UnityEngine;
using UnityEngine.EventSystems;
namespace WI namespace ChunilENG
{ {
public enum ViewMode public enum ViewMode
{ {
@@ -20,7 +17,7 @@ namespace WI
} }
//TODO::Something... Util Functions //TODO::Something... Util Functions
public class OrbitalController : MonoBehaviour, ISingle public class OrbitalController : MonoBehaviour
{ {
public ViewMode viewMode; public ViewMode viewMode;
private Vector3 originValue; private Vector3 originValue;
@@ -108,7 +105,7 @@ namespace WI
var moveVector = camera.transform.TransformDirection(x, y, -z); var moveVector = camera.transform.TransformDirection(x, y, -z);
moveVector.y = 0; moveVector.y = 0;
moveVector *= moveSpeed * (currentDistance / maxDistance); //moveVector *= moveSpeed * (currentDistance / maxDistance);
nextPosition = cameraPivot.transform.position - moveVector; nextPosition = cameraPivot.transform.position - moveVector;
} }

View File

@@ -1,8 +1,6 @@
using System;
using UnityEngine; using UnityEngine;
using System.Collections;
namespace WI namespace ChunilENG
{ {
public class OrbitalControllerTarget : MonoBehaviour public class OrbitalControllerTarget : MonoBehaviour
{ {

View File

@@ -1,4 +1,3 @@
using CHN;
using Cysharp.Threading.Tasks; using Cysharp.Threading.Tasks;
using System; using System;
using UnityEngine; using UnityEngine;
@@ -7,7 +6,6 @@ using UVC.Data;
using UVC.Data.Mqtt; using UVC.Data.Mqtt;
using UVC.Locale; using UVC.Locale;
using UVC.Util; using UVC.Util;
using WI;
namespace ChunilENG namespace ChunilENG
{ {

View File

@@ -1,4 +1,3 @@
using CHN;
using ChunilENG.Management; using ChunilENG.Management;
using ChunilENG.UI; using ChunilENG.UI;
using Cysharp.Threading.Tasks; using Cysharp.Threading.Tasks;
@@ -15,9 +14,14 @@ namespace ChunilENG
[DefaultExecutionOrder(90)] [DefaultExecutionOrder(90)]
public class ChunilENGSceneMain : SingletonScene<ChunilENGSceneMain> public class ChunilENGSceneMain : SingletonScene<ChunilENGSceneMain>
{ {
public Building building;
MQTT mqttManager; MQTT mqttManager;
HTTPRequester httpManager; HTTPRequester httpManager;
DataManager dataManager; DataManager dataManager;
ViewManager viewManager;
MachineInfoItemManager machineInfoItemManager;
ThermostatInfoItemManager thermostatInfoItemManager;
ChunilENGUIManager uiManager; ChunilENGUIManager uiManager;
public Action Initialized; public Action Initialized;
@@ -34,13 +38,22 @@ namespace ChunilENG
private async void OnAppInitialized() private async void OnAppInitialized()
{ {
//await requestDataAsync(); //await requestDataAsync();
mqttManager = FindAnyObjectByType<MQTT>(); building = FindAnyObjectByType<Building>();
httpManager = FindAnyObjectByType<HTTPRequester>(); await building.Init();
uiManager = await LoadManager<ChunilENGUIManager>(); uiManager = await LoadManager<ChunilENGUIManager>();
machineInfoItemManager = await LoadManager<MachineInfoItemManager>();
thermostatInfoItemManager = await LoadManager<ThermostatInfoItemManager>();
viewManager = await LoadManager<ViewManager>();
mqttManager = FindAnyObjectByType<MQTT>();
dataManager = await LoadManager<DataManager>(); dataManager = await LoadManager<DataManager>();
httpManager = FindAnyObjectByType<HTTPRequester>();
SetupDataSetting(); SetupDataSetting();
if (Initialized != null) if (Initialized != null)
{ {
Initialized.Invoke(); Initialized.Invoke();
@@ -55,20 +68,8 @@ namespace ChunilENG
{ {
var popupCanvas = uiManager.GetCanvas<PopupCanvas>(); var popupCanvas = uiManager.GetCanvas<PopupCanvas>();
mqttManager.onWorkshopData += dataManager.SetWorkshopStatus; mqttManager.onThermostatData += dataManager.SetThermostatDataList;
mqttManager.onWorkshopData += popupCanvas.GetPanel<TotalProgressPanel>().SetWorkProgressStatus; dataManager.onSetThermostatData += popupCanvas.GetPanel<ThermostatControlPanel>().SetData;
mqttManager.onMachineData += dataManager.SetFloorProductionStatus;
mqttManager.onMachineData += dataManager.UpdateMQTTData;
httpManager.onMachineKPIData += dataManager.UpdateKPIData;
dataManager.onFirstFloorInfo += popupCanvas.GetPanel<ProductionProgressPanel>().SetProductionStatus;
dataManager.onSecondFloorInfo += popupCanvas.GetPanel<AssemblyProgressPanel>().SetProductionStatus;
dataManager.onFinalInspectionData += popupCanvas.GetPanel<FinalInspectionPanel>().SetProductionStatus;
dataManager.onTotalFloorInfo += popupCanvas.GetPanel<TotalProgressPanel>().SetTotalProductionStatus;
dataManager.onKPIInfo += popupCanvas.GetPanel<TotalProgressPanel>().SetMachineEffectiveness;
dataManager.onWorkShopInfo += popupCanvas.GetPanel<WorkProgressPanel>().SetWorkProgressStatus;
} }
private readonly Dictionary<Type, Manager> managers = new(); private readonly Dictionary<Type, Manager> managers = new();

View File

@@ -1,5 +1,5 @@
using ChunilENG.Management;
using UVC.UI.Commands; using UVC.UI.Commands;
using WI;
namespace ChunilENG.UI.Command namespace ChunilENG.UI.Command
{ {
@@ -14,7 +14,8 @@ namespace ChunilENG.UI.Command
public void Execute(object? parameter = null) public void Execute(object? parameter = null)
{ {
ChunilENGAppMain.Instance.cameraController.SetViewMode(viewMode); var viewManager = ChunilENGSceneMain.Instance.GetManager<ViewManager>();
viewManager.ChangedViewMode(viewMode);
} }
} }
} }

Some files were not shown because too many files have changed in this diff Show More