diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index cfdb964..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,78 +0,0 @@
-# This .gitignore file should be placed at the root of your Unity project directory
-#
-# Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore
-#
-/[Ll]ibrary/
-/[Tt]emp/
-/[Oo]bj/
-/[Bb]uild/
-/[Bb]uilds/
-/[Ll]ogs/
-/[Uu]ser[Ss]ettings/
-
-# SVN Files
-.svn/
-
-# MemoryCaptures can get excessive in size.
-# They also could contain extremely sensitive data
-/[Mm]emoryCaptures/
-
-# Asset meta data should only be ignored when the corresponding asset is also ignored
-!/[Aa]ssets/**/*.meta
-
-# Uncomment this line if you wish to ignore the asset store tools plugin
-# /[Aa]ssets/AssetStoreTools*
-
-# Autogenerated Jetbrains Rider plugin
-/[Aa]ssets/Plugins/Editor/JetBrains*
-
-# Visual Studio cache directory
-.vs/
-
-# Gradle cache directory
-.gradle/
-
-# Autogenerated VS/MD/Consulo solution and project files
-ExportedObj/
-.consulo/
-*.csproj
-*.unityproj
-*.sln
-*.suo
-*.tmp
-*.user
-*.userprefs
-*.pidb
-*.booproj
-*.svd
-*.pdb
-*.mdb
-*.opendb
-*.VC.db
-
-# Unity3D generated meta files
-*.pidb.meta
-*.pdb.meta
-*.mdb.meta
-
-# Unity3D generated file on crash reports
-sysinfo.txt
-
-# Builds
-*.apk
-*.unitypackage
-
-# Crashlytics generated file
-crashlytics-build.properties
-
-# Packed Addressables
-/[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin*
-
-# Temporary auto-generated Android Assets
-/[Aa]ssets/[Ss]treamingAssets/aa.meta
-/[Aa]ssets/[Ss]treamingAssets/aa/*
-/Build Group
-/素材
-/文档
-/Assets/Plugins
-/上传到Github.txt
diff --git a/.vsconfig b/.vsconfig
deleted file mode 100644
index d70cd98..0000000
--- a/.vsconfig
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "version": "1.0",
- "components": [
- "Microsoft.VisualStudio.Workload.ManagedGame"
- ]
-}
diff --git a/Assets/Resources/DOTweenSettings.asset b/Assets/Resources/DOTweenSettings.asset
deleted file mode 100644
index eb180a2..0000000
--- a/Assets/Resources/DOTweenSettings.asset
+++ /dev/null
@@ -1,50 +0,0 @@
-%YAML 1.1
-%TAG !u! tag:unity3d.com,2011:
---- !u!114 &11400000
-MonoBehaviour:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 0}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 16995157, guid: a811bde74b26b53498b4f6d872b09b6d, type: 3}
- m_Name: DOTweenSettings
- m_EditorClassIdentifier:
- useSafeMode: 1
- safeModeOptions:
- nestedTweenFailureBehaviour: 0
- timeScale: 1
- useSmoothDeltaTime: 0
- maxSmoothUnscaledTime: 0.15
- rewindCallbackMode: 0
- showUnityEditorReport: 0
- logBehaviour: 0
- drawGizmos: 1
- defaultRecyclable: 0
- defaultAutoPlay: 3
- defaultUpdateType: 0
- defaultTimeScaleIndependent: 0
- defaultEaseType: 6
- defaultEaseOvershootOrAmplitude: 1.70158
- defaultEasePeriod: 0
- defaultAutoKill: 1
- defaultLoopType: 0
- debugMode: 0
- debugStoreTargetId: 0
- showPreviewPanel: 1
- storeSettingsLocation: 0
- modules:
- showPanel: 0
- audioEnabled: 1
- physicsEnabled: 1
- physics2DEnabled: 1
- spriteEnabled: 1
- uiEnabled: 1
- textMeshProEnabled: 0
- tk2DEnabled: 0
- deAudioEnabled: 0
- deUnityExtendedEnabled: 0
- showPlayingTweens: 0
- showPausedTweens: 0
diff --git a/Assets/Resources/DOTweenSettings.asset.meta b/Assets/Resources/DOTweenSettings.asset.meta
deleted file mode 100644
index 6b4a678..0000000
--- a/Assets/Resources/DOTweenSettings.asset.meta
+++ /dev/null
@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: acaa4d5287a4af541ad72358c0ea1fb9
-NativeFormatImporter:
- externalObjects: {}
- mainObjectFileID: 11400000
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Resources/Threeyes/EventPlayerSetting.asset b/Assets/Resources/Threeyes/EventPlayerSetting.asset
deleted file mode 100644
index 486cead..0000000
--- a/Assets/Resources/Threeyes/EventPlayerSetting.asset
+++ /dev/null
@@ -1,21 +0,0 @@
-%YAML 1.1
-%TAG !u! tag:unity3d.com,2011:
---- !u!114 &11400000
-MonoBehaviour:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 0}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: a068085e5ef358145aea8e47427c61b4, type: 3}
- m_Name: EventPlayerSetting
- m_EditorClassIdentifier:
- version: 3.0
- showPropertyInHierarchy: 1
- useTimeline: 0
- useVideoPlayer: 0
- useBezierSolution: 0
- useDoTweenPro: 0
- activeDoTweenProPreview: 0
diff --git a/Assets/Resources/Threeyes/EventPlayerSetting.asset.meta b/Assets/Resources/Threeyes/EventPlayerSetting.asset.meta
deleted file mode 100644
index 32ed1da..0000000
--- a/Assets/Resources/Threeyes/EventPlayerSetting.asset.meta
+++ /dev/null
@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: 767881a953fcc7a449b460208e46ae5e
-NativeFormatImporter:
- externalObjects: {}
- mainObjectFileID: 11400000
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Threeyes/Core.meta b/Assets/Threeyes/Core.meta
deleted file mode 100644
index 9909d23..0000000
--- a/Assets/Threeyes/Core.meta
+++ /dev/null
@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: c96fe3845e38fe541987cb2a21c99aa3
-folderAsset: yes
-DefaultImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Threeyes/Core/Base.meta b/Assets/Threeyes/Core/Base.meta
deleted file mode 100644
index 0fdd9e0..0000000
--- a/Assets/Threeyes/Core/Base.meta
+++ /dev/null
@@ -1,10 +0,0 @@
-fileFormatVersion: 2
-guid: 6edf51e832bf1a8499c3ca728fb2ab61
-folderAsset: yes
-timeCreated: 1516354468
-licenseType: Free
-DefaultImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Threeyes/Core/Base/Attribute.meta b/Assets/Threeyes/Core/Base/Attribute.meta
deleted file mode 100644
index 2ead4b8..0000000
--- a/Assets/Threeyes/Core/Base/Attribute.meta
+++ /dev/null
@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: 0c8babd6d5e2165419e13af83e42bcc3
-folderAsset: yes
-DefaultImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Threeyes/Core/Base/Attribute/Editor.meta b/Assets/Threeyes/Core/Base/Attribute/Editor.meta
deleted file mode 100644
index edae2dc..0000000
--- a/Assets/Threeyes/Core/Base/Attribute/Editor.meta
+++ /dev/null
@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: 3e582c9b85c9eec478a3abc5b1eaa640
-folderAsset: yes
-DefaultImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Threeyes/Core/Base/Attribute/Editor/EnumMaskPropertyDrawer.cs b/Assets/Threeyes/Core/Base/Attribute/Editor/EnumMaskPropertyDrawer.cs
deleted file mode 100644
index c6b49fd..0000000
--- a/Assets/Threeyes/Core/Base/Attribute/Editor/EnumMaskPropertyDrawer.cs
+++ /dev/null
@@ -1,81 +0,0 @@
-// (C) 2014 ERAL
-// Distributed under the Boost Software License, Version 1.0.
-// (See copy at http://www.boost.org/LICENSE_1_0.txt)
-
-#if UNITY_EDITOR
-using UnityEngine;
-using UnityEditor;
-
-namespace Threeyes.Editor
-{
- namespace Threeyes.CommonEditor
- {
- ///
- /// Ref from: https://gist.github.com/eral/773d2b289200528d1216
- /// 功能:Unity2020以前带Flag的Enum,需要这个字段来标识
- ///
- [CustomPropertyDrawer(typeof(EnumMaskAttribute))]
- public class EnumMaskPropertyDrawer : PropertyDrawer
- {
-
- public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
- {
- if (SerializedPropertyType.Enum == property.propertyType)
- {
- object current = GetCurrent(property);
- if (null != current)
- {
- EditorGUI.BeginChangeCheck();
- var value = EditorGUI.EnumFlagsField(position, label, (System.Enum)current);
- if (EditorGUI.EndChangeCheck())
- {
- property.intValue = System.Convert.ToInt32(value);
- }
- }
- }
- else
- {
- EditorGUI.LabelField(position, label, new GUIContent("This type has not supported."));
- }
- }
-
- private static object GetCurrent(SerializedProperty property)
- {
- object result = property.serializedObject.targetObject;
- var property_names = property.propertyPath.Replace(".Array.data", ".").Split('.');
- foreach (var property_name in property_names)
- {
- var parent = result;
- var indexer_start = property_name.IndexOf('[');
- if (-1 == indexer_start)
- {
- var binding_flags = System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic;
- result = parent.GetType().GetField(property_name, binding_flags).GetValue(parent);
- }
- else if (parent.GetType().IsArray)
- {
- var indexer_end = property_name.IndexOf(']');
- var index_string = property_name.Substring(indexer_start + 1, indexer_end - indexer_start - 1);
- var index = int.Parse(index_string);
- var array = (System.Array)parent;
- if (index < array.Length)
- {
- result = array.GetValue(index);
- }
- else
- {
- result = null;
- break;
- }
- }
- else
- {
- throw new System.MissingFieldException();
- }
- }
- return result;
- }
- }
- }
-}
-#endif
diff --git a/Assets/Threeyes/Core/Base/Attribute/EnumMaskAttribute.cs b/Assets/Threeyes/Core/Base/Attribute/EnumMaskAttribute.cs
deleted file mode 100644
index f5cb71a..0000000
--- a/Assets/Threeyes/Core/Base/Attribute/EnumMaskAttribute.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-
-using UnityEngine;
-///
-/// 针对多选枚举(枚举要有[System.Flags]标识)
-/// 功能:Unity2020以前带Flag的Enum,需要这个字段标识才能绘制多选下来框(尽量不使用,如有必要就将项目转为2020)
-///
-public class EnumMaskAttribute : PropertyAttribute
-{
-}
diff --git a/Assets/Threeyes/Core/Base/Attribute/MaterialPropertyNameAttribute.cs b/Assets/Threeyes/Core/Base/Attribute/MaterialPropertyNameAttribute.cs
deleted file mode 100644
index d12b6c0..0000000
--- a/Assets/Threeyes/Core/Base/Attribute/MaterialPropertyNameAttribute.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-using System;
-using UnityEngine;
-
-///
-/// 根据当前RenderingPipeline,返回正确的值
-///
-/// PS:
-/// 1.Inspector Debug模式及EditShader可以看到对应的名称
-///
-[AttributeUsage(AttributeTargets.Field)]
-public class MaterialPropertyNameAttribute : PropertyAttribute
-{
- public string PropertyName
- {
- get
- {
-#if UNITY_PIPELINE_URP
- return urpPropertyName;
-#elif UNITY_PIPELINE_HDRP
- return hdrpPropertyName;
-#else
- return builtInRPPropertyName;
-#endif
- }
- }
-
- public string builtInRPPropertyName;
- public string urpPropertyName;
- public string hdrpPropertyName;
-
- public MaterialPropertyNameAttribute(string builtInRPPropertyName, string urpPropertyName, string hdrpPropertyName)
- {
- //PS:如果无此字段,直接设置为null
- this.builtInRPPropertyName = builtInRPPropertyName;
- this.urpPropertyName = urpPropertyName;
- this.hdrpPropertyName = hdrpPropertyName;
- }
-}
\ No newline at end of file
diff --git a/Assets/Threeyes/Core/Base/Cache.meta b/Assets/Threeyes/Core/Base/Cache.meta
deleted file mode 100644
index f0edaa4..0000000
--- a/Assets/Threeyes/Core/Base/Cache.meta
+++ /dev/null
@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: 48bbb17a412593a429cc8d1b716e9987
-folderAsset: yes
-DefaultImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Threeyes/Core/Base/Cache/ObjectCache.cs b/Assets/Threeyes/Core/Base/Cache/ObjectCache.cs
deleted file mode 100644
index 5a1c40f..0000000
--- a/Assets/Threeyes/Core/Base/Cache/ObjectCache.cs
+++ /dev/null
@@ -1,163 +0,0 @@
-using System;
-using System.Collections.Generic;
-using UnityEngine.Events;
-
-namespace Threeyes.Cache
-{
- public interface IObjectCache where T : class
- {
- int CountAll { get; }
-
- void Add(TID id, T element);
- T Get(TID id, bool useCache);
- T Get(TID id);
-
- CachedObject Get(TID id, out T v);
-
- void Release(TID id, T element);
-
- void Clear();
- }
- ///
- /// Cache Asset by ID
- /// ToUpdate:
- ///
- ///
- ///
- public class ObjectCache : IObjectCache, IDisposable
- where T : class
- {
- public int CountAll { get { return m_Dictionary.Count; } }
-
- internal readonly Dictionary m_Dictionary;
-
- private readonly Func m_CreateFunc;
- private readonly UnityAction m_ActionOnGet;
- private readonly UnityAction m_ActionOnRelease;
- private readonly UnityAction m_ActionOnDestroy;
-
- private readonly int m_MaxSize;
- internal bool m_CollectionCheck;
-
- //ToThink:是否需要限制上限(或者把限制的方法做成Func,子类可通过根据当前数据的总大小是否超过上限,来决定是否缓存)
- public ObjectCache(Func createFunc, UnityAction actionOnGet = null, UnityAction actionOnRelease = null, UnityAction actionOnDestroy = null, bool collectionCheck = false, int maxSize = 10000)
- {
- m_Dictionary = new Dictionary();
- m_MaxSize = maxSize;
- m_CollectionCheck = collectionCheck;
- m_CreateFunc = createFunc != null ? createFunc : DefaultCreateFunc;
- m_ActionOnGet = actionOnGet != null ? actionOnGet : DefaultOnGetFunc;
- m_ActionOnRelease = actionOnRelease != null ? actionOnRelease : DefaultOnReleaseFunc;
- m_ActionOnDestroy = actionOnDestroy != null ? actionOnDestroy : DefaultOnDestroyFunc;
-
- if (m_MaxSize <= 0)
- {
- throw new ArgumentException("Max Size must be greater than 0", "maxSize");
- }
- }
- public virtual void Add(TID id, T element)
- {
- if (element != null && !m_Dictionary.ContainsKey(id))//判断是否创建成功
- m_Dictionary.Add(id, element);//Save to dic
- }
-
- ///
- ///
- ///
- ///
- /// null if not exists
- public virtual T Get(TID id)
- {
- return Get(id, true);
- }
-
- public T Get(TID id, bool useCache)
- {
- if (!useCache)
- return m_CreateFunc(id);//直接调用创建方法,不需要缓存
-
- T val = null;
-
- if (!m_Dictionary.ContainsKey(id))
- {
- val = m_CreateFunc(id);//Create new one
- if (val != null)//Check if create successed
- m_Dictionary.Add(id, val);//Save to dic
- //UnityEngine.Debug.Log("Load from File: " + typeof(T) + " " + id);
- }
- else
- {
- val = m_Dictionary[id];//Get from cache
- //UnityEngine.Debug.Log("Get from cache: " + typeof(T) + " " + id);
- }
-
- InvokeOnGetFunc(id, val);
- return val;
- }
-
- public CachedObject Get(TID id, out T v)
- {
- return new CachedObject(id, v = Get(id), this);
- }
-
- public void Release(TID id, T element)
- {
- InvokeOnReleaseFunc(id, element);
- //PS:因为Cache不使用堆栈,所以不需要调用其他代码
- }
- public void Clear()
- {
- if (m_ActionOnDestroy != null)
- {
- foreach (var item in m_Dictionary)
- {
- m_ActionOnDestroy(item.Key, item.Value);
- }
- }
- m_Dictionary.Clear();
- }
- public void Dispose()
- {
- Clear();
- }
-
- protected virtual void InvokeOnGetFunc(TID id, T element)
- {
- m_ActionOnGet?.Invoke(id, element);
- }
- protected virtual void InvokeOnReleaseFunc(TID id, T element)
- {
- m_ActionOnRelease?.Invoke(id, element);
- }
-
- #region Default Method
- protected virtual T DefaultCreateFunc(TID id) { throw new NotImplementedException(); }
- protected virtual void DefaultOnGetFunc(TID id, T target) { }
-
- protected virtual void DefaultOnReleaseFunc(TID id, T target) { }
- protected virtual void DefaultOnDestroyFunc(TID id, T target) { }
-
- #endregion
- }
-
- public struct CachedObject : IDisposable where T : class
- {
- private readonly TID m_ID;
-
- private readonly T m_ToReturn;
-
- private readonly IObjectCache m_Pool;
-
- internal CachedObject(TID id, T value, IObjectCache pool)
- {
- m_ID = id;
- m_ToReturn = value;
- m_Pool = pool;
- }
-
- void IDisposable.Dispose()
- {
- m_Pool.Release(m_ID, m_ToReturn);
- }
- }
-}
\ No newline at end of file
diff --git a/Assets/Threeyes/Core/Base/Common.meta b/Assets/Threeyes/Core/Base/Common.meta
deleted file mode 100644
index 9d19194..0000000
--- a/Assets/Threeyes/Core/Base/Common.meta
+++ /dev/null
@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: 6ef255f4248105f43918c7a167eb1c6d
-folderAsset: yes
-DefaultImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Threeyes/Core/Base/Common/CloneableDataBase.cs b/Assets/Threeyes/Core/Base/Common/CloneableDataBase.cs
deleted file mode 100644
index 6ab694c..0000000
--- a/Assets/Threeyes/Core/Base/Common/CloneableDataBase.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-using System;
-namespace Threeyes.Base
-{
- public interface ICloneableData : ICloneable
- {
- TInst Clone();
- }
-
-
- ///
- /// Make this data cloneable
- ///
- public abstract class CloneableDataBase : ICloneable
- {
- #region Editor Utility
-
- public object Clone()
- {
- return this.MemberwiseClone();
- }
- ///
- /// Copy data to other instance
- /// (PS: only clone struct and reference. For class type instance, you should create new instance using their construct function(eg: AnimationCurve(params Keyframe[] keys))
- ///
- ///
- ///
- public virtual TInst Clone()
- {
- return (TInst)Clone();
- }
-
- #endregion
- }
-}
\ No newline at end of file
diff --git a/Assets/Threeyes/Core/Base/Common/CloneableDataBase.cs.meta b/Assets/Threeyes/Core/Base/Common/CloneableDataBase.cs.meta
deleted file mode 100644
index 6009337..0000000
--- a/Assets/Threeyes/Core/Base/Common/CloneableDataBase.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: f280155ddb3921c4396b8a4f4a074133
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Threeyes/Core/Base/Common/DataObjectBase.cs b/Assets/Threeyes/Core/Base/Common/DataObjectBase.cs
deleted file mode 100644
index f140286..0000000
--- a/Assets/Threeyes/Core/Base/Common/DataObjectBase.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-namespace Threeyes.Base
-{
- ///
- /// 普通数据类的基类,带有比较、空检测等功能
- ///
- public class DataObjectBase
- {
- public override bool Equals(object obj)
- {
- return base.Equals(obj);
- }
-
- public override int GetHashCode()
- {
- return base.GetHashCode();
- }
-
- public static bool operator ==(DataObjectBase x, DataObjectBase y)
- {
- //可避免空引用: https://stackoverflow.com/questions/4219261/overriding-operator-how-to-compare-to-null
- if (object.ReferenceEquals(x, null))
- {
- return object.ReferenceEquals(y, null);
- }
-
- return x.Equals(y);
- }
-
- public static bool operator !=(DataObjectBase x, DataObjectBase y)
- {
- return !x == y;
- }
-
- public static implicit operator bool(DataObjectBase exists)
- {
- return !(exists == null);
- }
- }
-}
\ No newline at end of file
diff --git a/Assets/Threeyes/Core/Base/Common/DataObjectBase.cs.meta b/Assets/Threeyes/Core/Base/Common/DataObjectBase.cs.meta
deleted file mode 100644
index f206734..0000000
--- a/Assets/Threeyes/Core/Base/Common/DataObjectBase.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 00b65aa5f1ed66c4498e2f9c6814c713
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Threeyes/Core/Base/Common/DefineSymbol.cs b/Assets/Threeyes/Core/Base/Common/DefineSymbol.cs
deleted file mode 100644
index f2f2554..0000000
--- a/Assets/Threeyes/Core/Base/Common/DefineSymbol.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-using System;
-
-///
-/// 插件的宏定义
-///
-[System.Serializable]
-public class DefineSymbol : IEquatable
-{
- public string name;//宏定义显示名称
- public string description_en;//英文注释
- public string description_cn;//中文注释
- public string rootFolderName;//根文件夹的名称,通过改名称知道相应插件是否存在(用|分割,针对放在多个地方的插件)
- public string mainFileName;//主要文件的相对路径(可空,主要是避免开发者自己创建的文件夹重名)
- //public string asmdefName;//相应的AsmDef文件名(Warning:因为名称不固定,所以暂不使用)
- public string packageName;
-
-
- public bool isUsing = false;//正在使用中
- public DefineSymbol(string name, string description_en, string description_cn, string rootFolderName = "", string mainFileName = "", string asmdefName = "", string packageName = "")
- {
- this.name = name;
- this.description_en = description_en;
- this.description_cn = description_cn;
-
- this.rootFolderName = rootFolderName;
- this.mainFileName = mainFileName;
- //this.asmdefName = asmdefName;
- this.packageName = packageName;
- }
-
- public bool Equals(DefineSymbol other)
- {
- if (other == null) return false;
- return (this.name.Equals(other.name));
- }
-}
\ No newline at end of file
diff --git a/Assets/Threeyes/Core/Base/Common/DefineSymbol.cs.meta b/Assets/Threeyes/Core/Base/Common/DefineSymbol.cs.meta
deleted file mode 100644
index 2f61ce6..0000000
--- a/Assets/Threeyes/Core/Base/Common/DefineSymbol.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 9979a7217081c2244a3f96a454a2791a
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Threeyes/Core/Base/Common/RangeBase.cs b/Assets/Threeyes/Core/Base/Common/RangeBase.cs
deleted file mode 100644
index 46a4336..0000000
--- a/Assets/Threeyes/Core/Base/Common/RangeBase.cs
+++ /dev/null
@@ -1,45 +0,0 @@
-using UnityEngine;
-
-public abstract class RangeBase where TValue : struct
-{
- public TValue MinValue { get { return minValue; } set { minValue = value; } }
- public TValue MaxValue { get { return maxValue; } set { maxValue = value; } }
- public abstract TValue RandomValue { get; }
-
- public abstract TValue Range { get; }
-
- [SerializeField] protected TValue minValue;
- [SerializeField] protected TValue maxValue;
-
- public RangeBase(TValue min, TValue max)
- {
- minValue = min;
- maxValue = max;
- }
-}
-
-[System.Serializable]
-public class Range_Float : RangeBase
-{
- public override float RandomValue { get { return Random.Range(MinValue, MaxValue); } }
- public override float Range { get { return MaxValue - MinValue; } }
-
- public Range_Float(float min, float max) : base(min, max) { }
-}
-
-[System.Serializable]
-public class Range_Int : RangeBase
-{
- public override int RandomValue { get { return Random.Range(MinValue, MaxValue + 1); } }//PS: Random.Range Returns a random integer number between min [inclusive] and max [exclusive]Ҫ+1
- public override int Range { get { return MaxValue - MinValue; } }
-
- public Range_Int(int min, int max) : base(min, max) { }
-}
-[System.Serializable]
-public class Range_Vector3 : RangeBase
-{
- public override Vector3 RandomValue { get { return new Vector3(Random.Range(MinValue.x, MaxValue.x), Random.Range(MinValue.y, MaxValue.y), Random.Range(MinValue.z, MaxValue.z)); } }
- public override Vector3 Range { get { return MaxValue - MinValue; } }
-
- public Range_Vector3(Vector3 min, Vector3 max) : base(min, max) { }
-}
diff --git a/Assets/Threeyes/Core/Base/Common/RangeBase.cs.meta b/Assets/Threeyes/Core/Base/Common/RangeBase.cs.meta
deleted file mode 100644
index 9a0295c..0000000
--- a/Assets/Threeyes/Core/Base/Common/RangeBase.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: e369a88d2fbe6014a9cae557d29a4709
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Threeyes/Core/Base/Component.meta b/Assets/Threeyes/Core/Base/Component.meta
deleted file mode 100644
index ec2eb4a..0000000
--- a/Assets/Threeyes/Core/Base/Component.meta
+++ /dev/null
@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: bbce49621aaf1e74abb56400c5f40e75
-folderAsset: yes
-DefaultImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Threeyes/Core/Base/Component/ComponentGroupBase.cs b/Assets/Threeyes/Core/Base/Component/ComponentGroupBase.cs
deleted file mode 100644
index 594c4b9..0000000
--- a/Assets/Threeyes/Core/Base/Component/ComponentGroupBase.cs
+++ /dev/null
@@ -1,61 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-using UnityEngine.Events;
-///
-/// 对具有相同组件T的"子物体"进行操作,动态获取
-///
-/// 适用于接口
-public class ComponentGroupBase : MonoBehaviour
-//where T : Component
-{
- public bool isIncludeHide = true;
- public bool isRecursive = true;
- public bool includeSelf = false;
- ///
- /// 适用于外部的链接组件
- ///
- public List listExtraComp = new List();
-
- public List ListComp
- {
- get { return GetAllComponent(); }
- }
-
- public virtual List GetAllComponent()
- {
- List listTempComp = new List();
- ForEachChildComponent((c) => listTempComp.Add(c));
- return listTempComp;
- }
-
- ///
- /// 针对特定的Component(比如依赖的组件)
- ///
- ///
- ///
- public virtual void ForEachChildComponent(UnityAction func)
- {
- ForEachChildComponent(func);
- }
-
-
- ///
- /// 子物体中的任意组件
- ///
- ///
- ///
- public virtual void ForEachChildComponent(UnityAction func)
- //where T2 : Component
- {
- transform.ForEachChildComponent(func, isIncludeHide, includeSelf, isRecursive);
-
- listExtraComp.ForEach((c) =>
- {
- Component cInst = c as Component;
- if (cInst)
- cInst.ForEachSelfComponent(func);
- });
- }
-
-}
diff --git a/Assets/Threeyes/Core/Base/Component/ComponentGroupBase.cs.meta b/Assets/Threeyes/Core/Base/Component/ComponentGroupBase.cs.meta
deleted file mode 100644
index d293bad..0000000
--- a/Assets/Threeyes/Core/Base/Component/ComponentGroupBase.cs.meta
+++ /dev/null
@@ -1,13 +0,0 @@
-fileFormatVersion: 2
-guid: 2124bbc615fb47d42b03434930f20c6b
-timeCreated: 1517568753
-licenseType: Free
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Threeyes/Core/Base/Component/ComponentHelperBase.cs b/Assets/Threeyes/Core/Base/Component/ComponentHelperBase.cs
deleted file mode 100644
index 8fad5dc..0000000
--- a/Assets/Threeyes/Core/Base/Component/ComponentHelperBase.cs
+++ /dev/null
@@ -1,71 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-///
-/// 所有ComponentHelper的基类
-///
-///
-public class ComponentHelperBase : MonoBehaviour
- where TComp : Component
-{
- public virtual TComp Comp
- {
- get
- {
- if (!comp)
- comp = GetCompFunc();
- return comp;
- }
- set
- {
- comp = value;
- }
- }
- public TComp comp;//待绑定的组件
-
- public TComp[] comps = null;//待绑定的组件
- public TComp[] Comps
- {
- get
- {
- if (comps.Length == 0)
- comps = GetCompsFunc();
- return comps;
- }
- set
- {
- comps = value;
- }
- }
-
- protected virtual TComp GetCompFunc()
- {
- if (this)//避免物体被销毁
- return GetComponent();
-
- return default(TComp);
- }
-
- protected virtual TComp[] GetCompsFunc()
- {
- if (this)//避免物体被销毁
- return GetComponents();
-
- return default(TComp[]);
- }
-
-
- ///
- /// 激活/隐藏(继承于Behaviour的)组件
- ///
- public bool EnableComp
- {
- get { return behaviour ? behaviour.enabled : false; }
- set { if (behaviour) behaviour.enabled = value; }
- }
-
- ///
- /// 尝试转换为Behaviour
- ///
- Behaviour behaviour { get { return Comp as Behaviour; } }
-}
diff --git a/Assets/Threeyes/Core/Base/Component/ComponentHelperBase.cs.meta b/Assets/Threeyes/Core/Base/Component/ComponentHelperBase.cs.meta
deleted file mode 100644
index 07ae609..0000000
--- a/Assets/Threeyes/Core/Base/Component/ComponentHelperBase.cs.meta
+++ /dev/null
@@ -1,13 +0,0 @@
-fileFormatVersion: 2
-guid: b48cc8fe8178e124e8d1d7141d587587
-timeCreated: 1524883666
-licenseType: Free
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Threeyes/Core/Base/Component/ComponentHelperGroupBase.cs b/Assets/Threeyes/Core/Base/Component/ComponentHelperGroupBase.cs
deleted file mode 100644
index 0fd2c9d..0000000
--- a/Assets/Threeyes/Core/Base/Component/ComponentHelperGroupBase.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-using UnityEngine.Events;
-
-public class ComponentHelperGroupBase : ComponentGroupBase
- where THelper : ComponentHelperBase
- where TComp : Component
-{
-
- public bool EnableComp
- {
- get { return enabled; }
- set { ForEachChildComponent((h) => h.EnableComp = value); }
- }
-
- ///
- /// 如果子对象符合条件,自动生成相应的组件
- ///
- public bool isAutoGenerateComp = false;
-
- public override void ForEachChildComponent(UnityAction func)
- {
- //自动添加相应的Helper组件
- if (isAutoGenerateComp)
- {
- UnityAction generateFunc = (com) =>
- {
- com.gameObject.AddComponentOnce();
- };
- ForEachChildComponent(generateFunc);
- }
-
- base.ForEachChildComponent(func);
- }
-
-}
diff --git a/Assets/Threeyes/Core/Base/Component/ComponentHelperGroupBase.cs.meta b/Assets/Threeyes/Core/Base/Component/ComponentHelperGroupBase.cs.meta
deleted file mode 100644
index 06745fc..0000000
--- a/Assets/Threeyes/Core/Base/Component/ComponentHelperGroupBase.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 61c2dd096bdda17498df79763cc2e49c
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Threeyes/Core/Base/Component/ComponentRemoteHelperBase.cs b/Assets/Threeyes/Core/Base/Component/ComponentRemoteHelperBase.cs
deleted file mode 100644
index 62dbc86..0000000
--- a/Assets/Threeyes/Core/Base/Component/ComponentRemoteHelperBase.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-///
-/// 功能:不通过直接引用的方式调用场景中的单例
-///
-public abstract class ComponentRemoteHelperBase : MonoBehaviour
-{
- public abstract TInst ManagerInstance { get; }
-}
diff --git a/Assets/Threeyes/Core/Base/Component/ComponentRemoteHelperBase.cs.meta b/Assets/Threeyes/Core/Base/Component/ComponentRemoteHelperBase.cs.meta
deleted file mode 100644
index 4b9b4f1..0000000
--- a/Assets/Threeyes/Core/Base/Component/ComponentRemoteHelperBase.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 3e15edae555a55240ab198532d060092
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Threeyes/Core/Base/Element.meta b/Assets/Threeyes/Core/Base/Element.meta
deleted file mode 100644
index fc82f08..0000000
--- a/Assets/Threeyes/Core/Base/Element.meta
+++ /dev/null
@@ -1,10 +0,0 @@
-fileFormatVersion: 2
-guid: aa4aea21d11b4544cb658e7305f52df4
-folderAsset: yes
-timeCreated: 1521696345
-licenseType: Free
-DefaultImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Threeyes/Core/Base/Element/ElementBase.cs b/Assets/Threeyes/Core/Base/Element/ElementBase.cs
deleted file mode 100644
index 97b9e6e..0000000
--- a/Assets/Threeyes/Core/Base/Element/ElementBase.cs
+++ /dev/null
@@ -1,92 +0,0 @@
-using UnityEngine;
-using UnityEngine.Events;
-using Threeyes.Pool;
-///
-/// 存储数据,其中TData可以是普通数据类XXXData,或者是继承于ScriptableObject的SOXXXInfo
-///
-/// 提示:如果需要使用多个参数初始化元素,可以将其包在一个XXData数据类中,作为T传送
-///
-public class ElementBase : MonoBehaviour, IPoolableHandler
- where TData : class
-{
- public TData data;
- public UnityEvent onAfterInit;
- public UnityEvent onBeforeDestroy;//BeforeDestroy
- public virtual void Init(TData tempData)
- {
- InitFunc(tempData);
- onAfterInit?.Invoke();
- }
-
- ///
- /// 使用已有的数据及参数进行初始化
- ///
- //[ContextMenu("Init")]
- public virtual void Init()
- {
- Init(data);
- }
-
- public virtual void InitFunc(TData data)
- {
- this.data = data;
- }
-
- public virtual void ResetData()
- {
-
- }
-
- public virtual void OnBeforeDestroy()
- {
- onBeforeDestroy?.Invoke();//调用相关事件
- }
- protected virtual void OnDestroy()
- {
- OnDespawnFunc();// PS: OnDestroy也可以调用此方法,可避免重复代码
- }
-
- #region Pool Callback
- ///
- /// 监听Pool Get时调用的事件
- ///
- /// PS:
- /// 1.此方法非必须实现,因为已经有Init作为初始化入口
- ///
- public virtual void OnSpawn()
- {
- OnSpawnFunc();
- }
-
- ///
- /// 监听Pool Release时调用的事件
- ///
- /// PS:
- /// 1.只有使用了对象池时,才需要实现该方法
- /// 2.主要用于:重置数值,去掉引用和委托监听
- ///
- public virtual void OnDespawn()
- {
- OnDespawnFunc();
- }
- protected virtual void OnSpawnFunc()
- {
- }
- protected virtual void OnDespawnFunc()
- {
- }
- #endregion
-
- #region Obsolete
- [System.Obsolete("Use onBeforeDestroy Instead")] [HideInInspector] public UnityEvent onDestroy;
-#if UNITY_EDITOR
- void OnValidate()
- {
-#pragma warning disable CS0618
- Threeyes.Editor.EditorVersionUpdateTool.TransferUnityEvent(this, ref onDestroy, ref onBeforeDestroy);
-#pragma warning restore CS0618
- }
-#endif
- #endregion
-
-}
\ No newline at end of file
diff --git a/Assets/Threeyes/Core/Base/Element/ElementBase.cs.meta b/Assets/Threeyes/Core/Base/Element/ElementBase.cs.meta
deleted file mode 100644
index 5cc102b..0000000
--- a/Assets/Threeyes/Core/Base/Element/ElementBase.cs.meta
+++ /dev/null
@@ -1,13 +0,0 @@
-fileFormatVersion: 2
-guid: 9597c29c4dbfc6b4aabaf37570968015
-timeCreated: 1521696246
-licenseType: Free
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Threeyes/Core/Base/Element/ElementGroupBase.cs b/Assets/Threeyes/Core/Base/Element/ElementGroupBase.cs
deleted file mode 100644
index 115f690..0000000
--- a/Assets/Threeyes/Core/Base/Element/ElementGroupBase.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-using System.Linq;
-///
-/// 存储相同的一系列数据
-///
-///
-public class ElementGroupBase : MonoBehaviour where T : class
-{
- public List listElement = new List();
-
- public virtual void ResetData()
- {
-
- }
-}
-
-//适用于带
-public abstract class ElementGroupBase : MonoBehaviour
- where TElement : ElementBase
- where TEleData : class
-{
- public List listElement = new List();
-
- public virtual void ResetData()
- {
-
- }
-
- public virtual void InitElement(TEleData eleData)
- {
- TElement inst = InitElementFunc(eleData);
- AddElementToList(inst);
- }
-
- protected abstract TElement InitElementFunc(TEleData eleData);
-
- protected virtual void AddElementToList(TElement element)
- {
- listElement.Add(element);
- }
-
- protected virtual void RemoveElementFromList(TElement element)
- {
- if (listElement.Contains(element))
- {
- listElement.Remove(element);
- }
- }
-
-}
-
diff --git a/Assets/Threeyes/Core/Base/Element/ElementGroupBase.cs.meta b/Assets/Threeyes/Core/Base/Element/ElementGroupBase.cs.meta
deleted file mode 100644
index 7c5196f..0000000
--- a/Assets/Threeyes/Core/Base/Element/ElementGroupBase.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 1174ed10c4d4b744c82e18c07cfb6987
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Threeyes/Core/Base/Instance.meta b/Assets/Threeyes/Core/Base/Instance.meta
deleted file mode 100644
index 9792c04..0000000
--- a/Assets/Threeyes/Core/Base/Instance.meta
+++ /dev/null
@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: 57df59b4990b5d24aaa0372358855a56
-folderAsset: yes
-DefaultImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Threeyes/Core/Base/Instance/InstanceBase.cs b/Assets/Threeyes/Core/Base/Instance/InstanceBase.cs
deleted file mode 100644
index 3d7eed1..0000000
--- a/Assets/Threeyes/Core/Base/Instance/InstanceBase.cs
+++ /dev/null
@@ -1,47 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-///
-/// 单例类的基类,需要InstanceManager辅助初始化,保证了Instance优先于其他代码进行初始化
-///
-///
-[RequireComponent(typeof(InstanceManager))]
-public class InstanceBase : MonoBehaviour, ISetInstance
- where T : InstanceBase
-{
- public static T Instance { get { return instance; } protected set { instance = value; } }
- private static T instance;
-
- public bool isDontDestroyOnLoad = false;
- bool isInit = false;
-
- public virtual void SetInstance()
- {
- if (isDontDestroyOnLoad && Instance && Instance != this)//因为已经实例化过一次,所以可以删掉非单例的物体
- {
- Destroy(gameObject);
- return;
- }
-
- if (!isInit)
- {
- SetInstanceFunc();
-
- if (isDontDestroyOnLoad)
- {
- transform.SetParent(null);//移动到根层级,避免父物体被销毁
- DontDestroyOnLoad(gameObject);
- }
- }
- }
-
- protected virtual void SetInstanceFunc()
- {
- Instance = this as T;
- isInit = true;
- }
-}
-public interface ISetInstance
-{
- void SetInstance();
-}
\ No newline at end of file
diff --git a/Assets/Threeyes/Core/Base/Instance/InstanceBase.cs.meta b/Assets/Threeyes/Core/Base/Instance/InstanceBase.cs.meta
deleted file mode 100644
index f200e17..0000000
--- a/Assets/Threeyes/Core/Base/Instance/InstanceBase.cs.meta
+++ /dev/null
@@ -1,13 +0,0 @@
-fileFormatVersion: 2
-guid: bc688ce639e760f4cb8ec8e5bb247ba0
-timeCreated: 1515582257
-licenseType: Free
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Threeyes/Core/Base/Instance/InstanceManager.cs b/Assets/Threeyes/Core/Base/Instance/InstanceManager.cs
deleted file mode 100644
index fc5bf5e..0000000
--- a/Assets/Threeyes/Core/Base/Instance/InstanceManager.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-///
-/// 初始化单例类,每个继承InstanceBase的物体都需要挂载该脚本
-///
-[DefaultExecutionOrder(-24200)]
-public class InstanceManager : MonoBehaviour
-{
- private void Awake()
- {
- Init();
- }
-
- public void Init()
- {
- ISetInstance[] arrInterface = transform.GetComponents();
-
- foreach (var inter in arrInterface)
- {
- inter.SetInstance();
- }
- }
-}
diff --git a/Assets/Threeyes/Core/Base/Instance/InstanceManager.cs.meta b/Assets/Threeyes/Core/Base/Instance/InstanceManager.cs.meta
deleted file mode 100644
index 9ed3c8a..0000000
--- a/Assets/Threeyes/Core/Base/Instance/InstanceManager.cs.meta
+++ /dev/null
@@ -1,13 +0,0 @@
-fileFormatVersion: 2
-guid: ae0a7773705b93e49a1e5c8300cbd18a
-timeCreated: 1515582649
-licenseType: Free
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: -24200
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Threeyes/Core/Base/Instance/InstanceManagerBase.cs b/Assets/Threeyes/Core/Base/Instance/InstanceManagerBase.cs
deleted file mode 100644
index 25ff1e1..0000000
--- a/Assets/Threeyes/Core/Base/Instance/InstanceManagerBase.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-///
-/// 用于管理任意数量(1~N)的同类组件,方便其他代码通过静态类访问
-///
-///
-///
-[RequireComponent(typeof(InstanceManager))]
-public class InstanceManagerBase : InstanceBase
- where TInst : InstanceManagerBase
- where TComp : Component
-{
- ///
- /// 当前的默认组件
- ///
- public static TComp Comp
- {
- get
- {
- if (!Instance.comp)
- Instance.comp = Instance.GetCompFunc();
- return Instance.comp;
- }
- }
-
- public TComp comp;//待绑定的组件
-
- protected virtual TComp GetCompFunc()
- {
- TComp comp = GameObject.FindObjectOfType();
- if (!comp)
- {
- Debug.LogError("Can't find type of" + typeof(TComp) + "!");
- }
- return comp;
- }
-
-}
diff --git a/Assets/Threeyes/Core/Base/Instance/InstanceManagerBase.cs.meta b/Assets/Threeyes/Core/Base/Instance/InstanceManagerBase.cs.meta
deleted file mode 100644
index dc24d65..0000000
--- a/Assets/Threeyes/Core/Base/Instance/InstanceManagerBase.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 616628164d1891144bd92a80bc1a177a
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Threeyes/Core/Base/Instance/InstanceManagerGroup.cs b/Assets/Threeyes/Core/Base/Instance/InstanceManagerGroup.cs
deleted file mode 100644
index 463a5d2..0000000
--- a/Assets/Threeyes/Core/Base/Instance/InstanceManagerGroup.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-using System.Linq;
-///
-/// 主动调用自身及子集下的Init方法,保证单例即使被隐藏也能正常初始化
-/// 适用于:挂在顶层非隐藏物体上
-///
-[DefaultExecutionOrder(-24201)]//保证比InstanceManager优先执行
-public class InstanceManagerGroup : ComponentGroupBase
-{
- private void Awake()
- {
- Init();
- }
- public void Init()
- {
- ForEachChildComponent((instM) => instM.Init());
- }
-}
diff --git a/Assets/Threeyes/Core/Base/Instance/InstanceManagerGroup.cs.meta b/Assets/Threeyes/Core/Base/Instance/InstanceManagerGroup.cs.meta
deleted file mode 100644
index fde7ff5..0000000
--- a/Assets/Threeyes/Core/Base/Instance/InstanceManagerGroup.cs.meta
+++ /dev/null
@@ -1,13 +0,0 @@
-fileFormatVersion: 2
-guid: 29080ce56dd3c3443ac0c0be3cb0de04
-timeCreated: 1515582649
-licenseType: Free
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: -24200
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Threeyes/Core/Base/Instance/SingletonBase.cs b/Assets/Threeyes/Core/Base/Instance/SingletonBase.cs
deleted file mode 100644
index 9a8280b..0000000
--- a/Assets/Threeyes/Core/Base/Instance/SingletonBase.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-
-///
-/// Singleton,自动创建并保证场景中至少存在一个
-///
-///
-public class SingletonBase : MonoBehaviour where T : MonoBehaviour
-{
- static T _Instance;
- public static T Instance
- {
- get
- {
- if (!_Instance)
- {
- _Instance = GameObject.FindObjectOfType();
- if (!_Instance)
- {
- GameObject newGo = new GameObject(typeof(T).ToString(), typeof(T));
- _Instance = newGo.GetComponent();
- }
- if (Application.isPlaying)
- DontDestroyOnLoad(_Instance.gameObject);
- }
- return _Instance;
- }
- }
-}
diff --git a/Assets/Threeyes/Core/Base/Instance/SingletonBase.cs.meta b/Assets/Threeyes/Core/Base/Instance/SingletonBase.cs.meta
deleted file mode 100644
index c685dd9..0000000
--- a/Assets/Threeyes/Core/Base/Instance/SingletonBase.cs.meta
+++ /dev/null
@@ -1,13 +0,0 @@
-fileFormatVersion: 2
-guid: 7a2936867d4f7834f9e49d5f6a2f8a5a
-timeCreated: 1523854345
-licenseType: Free
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Threeyes/Core/Base/Interface.meta b/Assets/Threeyes/Core/Base/Interface.meta
deleted file mode 100644
index e553d56..0000000
--- a/Assets/Threeyes/Core/Base/Interface.meta
+++ /dev/null
@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: 49c64a6c8e0ff884b8144ee918b56306
-folderAsset: yes
-DefaultImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Threeyes/Core/Base/Interface/ICopy.cs b/Assets/Threeyes/Core/Base/Interface/ICopy.cs
deleted file mode 100644
index fd7fdd7..0000000
--- a/Assets/Threeyes/Core/Base/Interface/ICopy.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using System;
-using System.Reflection;
-//Copy Fields
-public interface ICopy
-{
- ///
- /// Copy Fields from other
- ///
- ///
- void Copy(object source, object target);
-}
-
-public interface ICopyFilter
-{
- bool ShouldCopy(Type objType, MemberInfo memberInfo);
-}
diff --git a/Assets/Threeyes/Core/Base/Interface/ICopy.cs.meta b/Assets/Threeyes/Core/Base/Interface/ICopy.cs.meta
deleted file mode 100644
index 975c51d..0000000
--- a/Assets/Threeyes/Core/Base/Interface/ICopy.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 723590803104c09469610f15c9bace49
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Threeyes/Core/Base/Interface/IHierarchyViewInfo.cs b/Assets/Threeyes/Core/Base/Interface/IHierarchyViewInfo.cs
deleted file mode 100644
index cf1b6a1..0000000
--- a/Assets/Threeyes/Core/Base/Interface/IHierarchyViewInfo.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using System.Text;
-using UnityEngine;
-///
-/// Display Info in Hierarchy
-///
-public interface IHierarchyViewInfo
-{
-#if UNITY_EDITOR
-
- ///
- /// Type name of this Component for short
- ///
- string ShortTypeName { get; }
-
- ///
- /// Display Content
- ///
- ///
- void SetHierarchyGUIProperty(StringBuilder sB);
-
-#endif
-}
diff --git a/Assets/Threeyes/Core/Base/Interface/IHierarchyViewInfo.cs.meta b/Assets/Threeyes/Core/Base/Interface/IHierarchyViewInfo.cs.meta
deleted file mode 100644
index c0fcc62..0000000
--- a/Assets/Threeyes/Core/Base/Interface/IHierarchyViewInfo.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 4e063bc7310cdcd40849fe3e132963ef
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Threeyes/Core/Base/Interface/IProgramLifeCycle.cs b/Assets/Threeyes/Core/Base/Interface/IProgramLifeCycle.cs
deleted file mode 100644
index 09cd760..0000000
--- a/Assets/Threeyes/Core/Base/Interface/IProgramLifeCycle.cs
+++ /dev/null
@@ -1,28 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-
-///
-/// 程序退出的相关事件
-///
-public interface IProgramLifeCycle
-{
- ///
- /// 程序能否退出(需要注意,执行完毕后需要将该值设置为true)
- ///
- bool CanQuit { get; }
-
- ///
- /// 开始退出
- ///
- void OnQuitEnter();
-
- ///
- /// 尝试退出时的多帧更新方法(如进入退出动画)
- ///
- ///
- IEnumerator IETryQuit();
-
- int QuitExecuteOrder { get; }//退出的顺序
-
-}
diff --git a/Assets/Threeyes/Core/Base/Interface/IProgramLifeCycle.cs.meta b/Assets/Threeyes/Core/Base/Interface/IProgramLifeCycle.cs.meta
deleted file mode 100644
index 3ed36ef..0000000
--- a/Assets/Threeyes/Core/Base/Interface/IProgramLifeCycle.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 1ec524c7b4cd5c44db87de17dc998e59
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Threeyes/Core/Base/Interface/ISaveLoadConfig.cs b/Assets/Threeyes/Core/Base/Interface/ISaveLoadConfig.cs
deleted file mode 100644
index fd47c4f..0000000
--- a/Assets/Threeyes/Core/Base/Interface/ISaveLoadConfig.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-///
-/// 数据类读写配置(适用于数据类自行备份)
-///
-public interface ISaveLoadConfig
-{
- void SaveConfig();
- void LoadConfig();
-}
diff --git a/Assets/Threeyes/Core/Base/Interface/ISaveLoadConfig.cs.meta b/Assets/Threeyes/Core/Base/Interface/ISaveLoadConfig.cs.meta
deleted file mode 100644
index 3b15ef3..0000000
--- a/Assets/Threeyes/Core/Base/Interface/ISaveLoadConfig.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 6b38135087a99424298d749c95c84917
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Threeyes/Core/Base/Interface/IShowHide.cs b/Assets/Threeyes/Core/Base/Interface/IShowHide.cs
deleted file mode 100644
index a999247..0000000
--- a/Assets/Threeyes/Core/Base/Interface/IShowHide.cs
+++ /dev/null
@@ -1,48 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-
-public interface IShowHide
-{
- bool IsShowing { get; set; }
- void Show(bool isShow);
- void Show();
- void Hide();
- void ToggleShow();
-}
-
-public interface IShowHideEx : IShowHide
-{
- void ShowAtOnce(bool isShow);//如UI开始动画前的重置
-}
-
-
-//模板,直接复制粘贴
-//#region Override IShowHideInterface
-
-//public bool IsShowing { get { return isShowing; } set { isShowing = value; } }
-//public bool isShowing = false;
-
-//public void Show()
-//{
-// Show(true);
-//}
-//public void Hide()
-//{
-// Show(false);
-//}
-//public void ToggleShow()
-//{
-// Show(!IsShowing);
-//}
-//public void Show(bool isShow)
-//{
-//IsShowing = isShow;
-// ShowFunc(isShow);
-//}
-//protected virtual void ShowFunc(bool isShow)
-//{
-// gameObject.SetActive(isShow);
-//}
-
-//#endregion
diff --git a/Assets/Threeyes/Core/Base/Interface/IShowHide.cs.meta b/Assets/Threeyes/Core/Base/Interface/IShowHide.cs.meta
deleted file mode 100644
index f9cb203..0000000
--- a/Assets/Threeyes/Core/Base/Interface/IShowHide.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 444fdc282ee91d44da0046dd2f763168
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Threeyes/Core/Base/Interface/IValueHolder.cs b/Assets/Threeyes/Core/Base/Interface/IValueHolder.cs
deleted file mode 100644
index 6c969d9..0000000
--- a/Assets/Threeyes/Core/Base/Interface/IValueHolder.cs
+++ /dev/null
@@ -1,4 +0,0 @@
-public interface IValueHolder
-{
- TParam CurValue { get; set; }
-}
\ No newline at end of file
diff --git a/Assets/Threeyes/Core/Base/Interface/IValueHolder.cs.meta b/Assets/Threeyes/Core/Base/Interface/IValueHolder.cs.meta
deleted file mode 100644
index b312038..0000000
--- a/Assets/Threeyes/Core/Base/Interface/IValueHolder.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 8e445d335b7f68540bfeb48e5bbe9e7f
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Threeyes/Core/Base/Pool.meta b/Assets/Threeyes/Core/Base/Pool.meta
deleted file mode 100644
index 8845060..0000000
--- a/Assets/Threeyes/Core/Base/Pool.meta
+++ /dev/null
@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: 2fca6e3ad38465a4395c2660c4343b30
-folderAsset: yes
-DefaultImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Threeyes/Core/Base/Pool/BuiltIn.meta b/Assets/Threeyes/Core/Base/Pool/BuiltIn.meta
deleted file mode 100644
index 86296cb..0000000
--- a/Assets/Threeyes/Core/Base/Pool/BuiltIn.meta
+++ /dev/null
@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: dd3c417f1b20aef4d928083d936c5460
-folderAsset: yes
-DefaultImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Threeyes/Core/Base/Pool/BuiltIn/GameObjectPool.cs b/Assets/Threeyes/Core/Base/Pool/BuiltIn/GameObjectPool.cs
deleted file mode 100644
index 6e94c22..0000000
--- a/Assets/Threeyes/Core/Base/Pool/BuiltIn/GameObjectPool.cs
+++ /dev/null
@@ -1,79 +0,0 @@
-using System;
-using System.Collections.Generic;
-using UnityEngine;
-using UnityEngine.Events;
-
-namespace Threeyes.Pool
-{
- ///
- /// Manage GameObject
- ///
- /// Ref:https://thegamedev.guru/unity-cpu-performance/object-pooling/#object-pooling-in-unity-2021-your-options
- ///
- public class GameObjectPool : ObjectPool
- {
- public GameObject GOPoolManager
- {
- get
- {
- if (goPoolManager == null)
- {
- goPoolManager = new GameObject("PoolManager");
- }
- return goPoolManager;
- }
- }
- GameObject goPoolManager;
-
- public GameObjectPool(Func createFunc = null, UnityAction actionOnGet = null, UnityAction actionOnRelease = null, UnityAction actionOnDestroy = null, bool collectionCheck = false, int defaultCapacity = 10, int maxSize = 10000) : base(createFunc, actionOnGet, actionOnRelease, actionOnDestroy, collectionCheck, defaultCapacity, maxSize)
- {
- }
-
- #region Default Method
- protected override GameObject DefaultCreateFunc()
- {
- return new GameObject("PooledObject");
- }
- protected override void DefaultOnGetFunc(GameObject target)
- {
- target.SetActive(true);
- }
- protected override void DefaultOnReleaseFunc(GameObject target)
- {
- target.SetActive(false);
- target.transform.SetParent(GOPoolManager ? GOPoolManager.transform : null);//存放到一个Manager中
- }
- protected override void DefaultOnDestroyFunc(GameObject target)
- {
- UnityEngine.Object.Destroy(target);
- }
- #endregion
-
- ///PS:
- ///1.如果使用了Pool技术,那就会调用IPoolHandler接口对应的方法(参考LeanGameObjectPool.InvokeOnDespawn)
- ///2.不应该实现任何非通用代码(如设置父物体),以避免不通用。如果需要,请自行传入默认的方法
-
- static UnityAction actOnSpawn = (ele) => ele.OnSpawn();
- static UnityAction actOnDespawn = (ele) => ele.OnDespawn();
- protected override void InvokeOnGetFunc(GameObject element)
- {
- SendMessage(element, actOnSpawn);
- base.InvokeOnGetFunc(element);
- }
- protected override void InvokeOnReleaseFunc(GameObject element)
- {
- SendMessage(element, actOnDespawn);
- base.InvokeOnReleaseFunc(element);
- }
-
- #region Utility
- static List tempPoolables = new List();
- static void SendMessage(GameObject target, UnityAction act)
- {
- target.GetComponents(tempPoolables);
- for (var i = tempPoolables.Count - 1; i >= 0; i--)
- act?.Invoke(tempPoolables[i]);
- }
- #endregion
- }
-}
\ No newline at end of file
diff --git a/Assets/Threeyes/Core/Base/Pool/BuiltIn/GameObjectPool.cs.meta b/Assets/Threeyes/Core/Base/Pool/BuiltIn/GameObjectPool.cs.meta
deleted file mode 100644
index 7dcc3f2..0000000
--- a/Assets/Threeyes/Core/Base/Pool/BuiltIn/GameObjectPool.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: d3e791eb25ee4564b8f86e843658b015
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Threeyes/Core/Base/Pool/IObjectPool.cs b/Assets/Threeyes/Core/Base/Pool/IObjectPool.cs
deleted file mode 100644
index 82c83ef..0000000
--- a/Assets/Threeyes/Core/Base/Pool/IObjectPool.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using System;
-
-namespace Threeyes.Pool
-{
- ///
- /// Ref: UnityEngine.Pool.IObjectPoolΪ˼ݾɰ汾Խԭӿڸ
- ///
- ///
- public interface IObjectPool where T : class
- {
- int CountInactive
- {
- get;
- }
-
- T Get();
-
- PooledObject Get(out T v);
-
- void Release(T element);
-
- void Clear();
- }
-}
\ No newline at end of file
diff --git a/Assets/Threeyes/Core/Base/Pool/IObjectPool.cs.meta b/Assets/Threeyes/Core/Base/Pool/IObjectPool.cs.meta
deleted file mode 100644
index ac373bc..0000000
--- a/Assets/Threeyes/Core/Base/Pool/IObjectPool.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 7fedc865fd8badc428023e757950c4c3
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Threeyes/Core/Base/Pool/IPoolableHandler.cs b/Assets/Threeyes/Core/Base/Pool/IPoolableHandler.cs
deleted file mode 100644
index 8895c3b..0000000
--- a/Assets/Threeyes/Core/Base/Pool/IPoolableHandler.cs
+++ /dev/null
@@ -1,8 +0,0 @@
-namespace Threeyes.Pool
-{
- public interface IPoolableHandler
- {
- void OnSpawn();
- void OnDespawn();
- }
-}
\ No newline at end of file
diff --git a/Assets/Threeyes/Core/Base/Pool/IPoolableHandler.cs.meta b/Assets/Threeyes/Core/Base/Pool/IPoolableHandler.cs.meta
deleted file mode 100644
index 240947e..0000000
--- a/Assets/Threeyes/Core/Base/Pool/IPoolableHandler.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 2bb3805ba9bd1ff4499fe0053d47613c
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Threeyes/Core/Base/Pool/LinkedPool.cs b/Assets/Threeyes/Core/Base/Pool/LinkedPool.cs
deleted file mode 100644
index f745d28..0000000
--- a/Assets/Threeyes/Core/Base/Pool/LinkedPool.cs
+++ /dev/null
@@ -1,150 +0,0 @@
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-using UnityEngine.Events;
-
-namespace Threeyes.Pool
-{
- ///
- /// A linked list version of Pool.IObjectPool_1.
- ///
- /// Ref: UnityEngine.Pool.LinkedPool
- ///
- ///
- public class LinkedPool : IDisposable, IObjectPool where T : class
- {
- internal class LinkedPoolItem
- {
- internal LinkedPoolItem poolNext;
-
- internal T value;
- }
-
- private readonly Func m_CreateFunc;
-
- private readonly UnityAction m_ActionOnGet;
-
- private readonly UnityAction m_ActionOnRelease;
-
- private readonly UnityAction m_ActionOnDestroy;
-
- private readonly int m_Limit;
-
- internal LinkedPoolItem m_PoolFirst;
-
- internal LinkedPoolItem m_NextAvailableListItem;
-
- private bool m_CollectionCheck;
-
- public int CountInactive
- {
- get;
- private set;
- }
-
- public LinkedPool(Func createFunc, UnityAction actionOnGet = null, UnityAction actionOnRelease = null, UnityAction actionOnDestroy = null, bool collectionCheck = true, int maxSize = 10000)
- {
- if (createFunc == null)
- {
- throw new ArgumentNullException("createFunc");
- }
-
- if (maxSize <= 0)
- {
- throw new ArgumentException("maxSize", "Max size must be greater than 0");
- }
-
- m_CreateFunc = createFunc;
- m_ActionOnGet = actionOnGet;
- m_ActionOnRelease = actionOnRelease;
- m_ActionOnDestroy = actionOnDestroy;
- m_Limit = maxSize;
- m_CollectionCheck = collectionCheck;
- }
-
- public T Get()
- {
- T val = null;
- if (m_PoolFirst == null)
- {
- val = m_CreateFunc();
- }
- else
- {
- LinkedPoolItem poolFirst = m_PoolFirst;
- val = poolFirst.value;
- m_PoolFirst = poolFirst.poolNext;
- poolFirst.poolNext = m_NextAvailableListItem;
- m_NextAvailableListItem = poolFirst;
- m_NextAvailableListItem.value = null;
- CountInactive--;
- }
-
- m_ActionOnGet?.Invoke(val);
- return val;
- }
-
- public PooledObject Get(out T v)
- {
- return new PooledObject(v = Get(), this);
- }
-
- public void Release(T item)
- {
- if (m_CollectionCheck)
- {
- for (LinkedPoolItem linkedPoolItem = m_PoolFirst; linkedPoolItem != null; linkedPoolItem = linkedPoolItem.poolNext)
- {
- if (linkedPoolItem.value == item)
- {
- throw new InvalidOperationException("Trying to release an object that has already been released to the pool.");
- }
- }
- }
-
- m_ActionOnRelease?.Invoke(item);
- if (CountInactive < m_Limit)
- {
- LinkedPoolItem linkedPoolItem2 = m_NextAvailableListItem;
- if (linkedPoolItem2 == null)
- {
- linkedPoolItem2 = new LinkedPoolItem();
- }
- else
- {
- m_NextAvailableListItem = linkedPoolItem2.poolNext;
- }
-
- linkedPoolItem2.value = item;
- linkedPoolItem2.poolNext = m_PoolFirst;
- m_PoolFirst = linkedPoolItem2;
- CountInactive++;
- }
- else
- {
- m_ActionOnDestroy?.Invoke(item);
- }
- }
-
- public void Clear()
- {
- if (m_ActionOnDestroy != null)
- {
- for (LinkedPoolItem linkedPoolItem = m_PoolFirst; linkedPoolItem != null; linkedPoolItem = linkedPoolItem.poolNext)
- {
- m_ActionOnDestroy(linkedPoolItem.value);
- }
- }
-
- m_PoolFirst = null;
- m_NextAvailableListItem = null;
- CountInactive = 0;
- }
-
- public void Dispose()
- {
- Clear();
- }
- }
-}
\ No newline at end of file
diff --git a/Assets/Threeyes/Core/Base/Pool/LinkedPool.cs.meta b/Assets/Threeyes/Core/Base/Pool/LinkedPool.cs.meta
deleted file mode 100644
index af44497..0000000
--- a/Assets/Threeyes/Core/Base/Pool/LinkedPool.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 2202a116d9a711648bc2ba21f5039696
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Threeyes/Core/Base/Pool/ObjectPool.cs b/Assets/Threeyes/Core/Base/Pool/ObjectPool.cs
deleted file mode 100644
index 3282fbd..0000000
--- a/Assets/Threeyes/Core/Base/Pool/ObjectPool.cs
+++ /dev/null
@@ -1,139 +0,0 @@
-using System.Collections.Generic;
-using UnityEngine.Events;
-
-namespace Threeyes.Pool
-{
- ///
- /// Ref: UnityEngine.Pool.ObjectPool
- /// A stack based Pool.IObjectPool_1.
- ///
- public class ObjectPool : System.IDisposable, IObjectPool where T : class
- {
- public int CountAll { get; private set; }
- public int CountActive => CountAll - CountInactive;
- public int CountInactive => m_Stack.Count;
-
- internal readonly Stack m_Stack;
-
- private readonly System.Func m_CreateFunc;
- private readonly UnityAction m_ActionOnGet;
- private readonly UnityAction m_ActionOnRelease;
- private readonly UnityAction m_ActionOnDestroy;
-
- private readonly int m_MaxSize;
- internal bool m_CollectionCheck;
-
- public ObjectPool(System.Func createFunc, UnityAction actionOnGet = null, UnityAction actionOnRelease = null, UnityAction actionOnDestroy = null, bool collectionCheck = false, int defaultCapacity = 10, int maxSize = 10000)
- {
-
- m_Stack = new Stack(defaultCapacity);
- m_MaxSize = maxSize;
- m_CollectionCheck = collectionCheck;
- m_CreateFunc = createFunc != null ? createFunc : DefaultCreateFunc;
- m_ActionOnGet = actionOnGet != null ? actionOnGet : DefaultOnGetFunc;
- m_ActionOnRelease = actionOnRelease != null ? actionOnRelease : DefaultOnReleaseFunc;
- m_ActionOnDestroy = actionOnDestroy != null ? actionOnDestroy : DefaultOnDestroyFunc;
-
-
- //if (m_CreateFunc == null)
- //{
- // throw new ArgumentNullException("createFunc");
- //}
-
- if (m_MaxSize <= 0)
- {
- throw new System.ArgumentException("Max Size must be greater than 0", "maxSize");
- }
- }
- public T Get()
- {
- T val;
- if (m_Stack.Count == 0)
- {
- val = m_CreateFunc();
- CountAll++;
- }
- else
- {
- val = m_Stack.Pop();
- }
-
- InvokeOnGetFunc(val);
- return val;
- }
-
-
- ///
- ///
- /// PS:使用方式:通过using封装,临时使用某个缓存值,使用完成后会回到池中,案例如下 (https://docs.unity3d.com/2021.1/Documentation/ScriptReference/Pool.ObjectPool_1.Get.html)
- /// StringBuilder stringBuilder;
- /// using (stringBuilderPool.Get(out stringBuilder))
- /// {
- /// stringBuilder.AppendLine("Some text");
- /// Debug.Log(stringBuilder.ToString());
- /// }
- ///
- ///
- ///
- public PooledObject Get(out T v)
- {
- return new PooledObject(v = Get(), this);
- }
-
- public void Release(T element)
- {
- if (m_CollectionCheck && m_Stack.Count > 0 && m_Stack.Contains(element))
- {
- throw new System.InvalidOperationException("Trying to release an object that has already been released to the pool.");
- }
-
- InvokeOnReleaseFunc(element);
-
- if (CountInactive < m_MaxSize)
- {
- m_Stack.Push(element);
- }
- else
- {
- m_ActionOnDestroy?.Invoke(element);
- }
- }
-
-
- public void Clear()
- {
- if (m_ActionOnDestroy != null)
- {
- foreach (T item in m_Stack)
- {
- m_ActionOnDestroy(item);
- }
- }
-
- m_Stack.Clear();
- CountAll = 0;
- }
-
- public void Dispose()
- {
- Clear();
- }
-
- protected virtual void InvokeOnGetFunc(T element)
- {
- m_ActionOnGet?.Invoke(element);
- }
- protected virtual void InvokeOnReleaseFunc(T element)
- {
- m_ActionOnRelease?.Invoke(element);
- }
-
- #region Default Method
- protected virtual T DefaultCreateFunc() { throw new System.NotImplementedException(); }
- protected virtual void DefaultOnGetFunc(T target) { }
-
- protected virtual void DefaultOnReleaseFunc(T target) { }
- protected virtual void DefaultOnDestroyFunc(T target) { }
- #endregion
- }
-}
diff --git a/Assets/Threeyes/Core/Base/Pool/ObjectPool.cs.meta b/Assets/Threeyes/Core/Base/Pool/ObjectPool.cs.meta
deleted file mode 100644
index 61da9d6..0000000
--- a/Assets/Threeyes/Core/Base/Pool/ObjectPool.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: ba8850c828187c744828728bde4919d6
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Threeyes/Core/Base/Pool/PooledObject.cs b/Assets/Threeyes/Core/Base/Pool/PooledObject.cs
deleted file mode 100644
index cc01145..0000000
--- a/Assets/Threeyes/Core/Base/Pool/PooledObject.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-
-using System;
-
-namespace Threeyes.Pool
-{
- public struct PooledObject : IDisposable where T : class
- {
- private readonly T m_ToReturn;
-
- private readonly IObjectPool m_Pool;
-
- internal PooledObject(T value, IObjectPool pool)
- {
- m_ToReturn = value;
- m_Pool = pool;
- }
-
- void IDisposable.Dispose()
- {
- m_Pool.Release(m_ToReturn);
- }
- }
-}
diff --git a/Assets/Threeyes/Core/Base/Pool/PooledObject.cs.meta b/Assets/Threeyes/Core/Base/Pool/PooledObject.cs.meta
deleted file mode 100644
index 9cdb2ac..0000000
--- a/Assets/Threeyes/Core/Base/Pool/PooledObject.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: dcdbef1d8881d6f46820e6c586ec4c17
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Threeyes/Core/Base/SO.meta b/Assets/Threeyes/Core/Base/SO.meta
deleted file mode 100644
index fc74430..0000000
--- a/Assets/Threeyes/Core/Base/SO.meta
+++ /dev/null
@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: 4b118d5ab2cfd8047b77a7a17e21ec1e
-folderAsset: yes
-DefaultImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Threeyes/Core/Base/SO/SOBase.cs b/Assets/Threeyes/Core/Base/SO/SOBase.cs
deleted file mode 100644
index 497e257..0000000
--- a/Assets/Threeyes/Core/Base/SO/SOBase.cs
+++ /dev/null
@@ -1,65 +0,0 @@
-using System.Reflection;
-using UnityEngine;
-using System;
-using System.Runtime.Serialization;
-
-///
-/// Base class for all custom ScriptableObject
-///
-/// PS:
-/// 1.非必须继承,这里更多只是作为一个模板,表明ScriptableObject可用的事件回调,有需要的自行继承接口并实现对应方法
-///
-public sealed class SOBase : ScriptableObject
-{
- [OnDeserialized]//Get invoked after deserialization.
- internal void OnDeserializedMethod(StreamingContext context)
- {
- }
-
- #region Builtin callback (Do it yourself!)
- //Detail: https://forum.unity.com/threads/scriptableobject-behaviour-discussion-how-scriptable-objects-work.541212/
-
- /////
- ///// This function is called when the ScriptableObject script is started:
- ///// 1.When the ScriptableObject is created (in editor or at runtime)
- ///// 2.When the ScriptableObject is selected from the project window in the Editor
- ///// 3.When a scene is loaded IF at least one MonoBehaviour in that scene is referencing the ScriptableObject asset
- /////
- ///// Warning:ScriptableObjects will only receive Awake() if OnDisable() was previously called on the object.
- /////
- //protected virtual void Awake()
- //{
- //}
-
- /////
- ///// This function is called when the object is loaded:
- ///// 1.Immediately after the ScriptableObject's Awake() (before other callbacks on this or other objects)
- ///// 2.When the Unity Editor reloads IF in a scene that has a MonoBehaviour referencing that ScriptableObject asset (right after OnDisable())
- ///// 3.When entering play mode IF in a scene that has a MonoBehaviour referencing that ScriptableObject asset (right after OnDisable())
- /////
- //protected virtual void OnEnable()
- //{
- //}
- /////
- ///// This function is called when the scriptable object goes out of scope:
- ///// 1.When a scene is loaded and there are no MonoBehaviours in that scene that reference the ScriptableObject asset
- ///// 2.When the Unity Editor reloads IF in a scene that has a MonoBehaviour referencing that ScriptableObject
- ///// 3.When entering play mode IF in a scene that has a MonoBehaviour referencing that ScriptableObject
- ///// 4.Right before any OnDestroyed() callback
- /////
- ///// Warning:OnDisable() will only be called if OnEnable() was previously called on the ScriptableObject.
- /////
- //protected virtual void OnDisable()
- //{
- //}
- /////
- ///// This function is called when the scriptable object will be destroyed:
- ///// 1.The ScriptableObject is deleted in code
- ///// 2.The ScriptableObject is deleted from the assets folder in the Editor
- ///// 3.The ScriptableObject was created at runtime and the application is quitting(or exiting play mode)
- /////
- //protected virtual void OnDestroy()
- //{
- //}
- #endregion
-}
\ No newline at end of file
diff --git a/Assets/Threeyes/Core/Base/SO/SOBase.cs.meta b/Assets/Threeyes/Core/Base/SO/SOBase.cs.meta
deleted file mode 100644
index 668432c..0000000
--- a/Assets/Threeyes/Core/Base/SO/SOBase.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 9cf5f87dcfac53c4dace4dc57419c7c6
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Threeyes/Core/Base/SO/SOBytesAsset.cs b/Assets/Threeyes/Core/Base/SO/SOBytesAsset.cs
deleted file mode 100644
index d0b4abf..0000000
--- a/Assets/Threeyes/Core/Base/SO/SOBytesAsset.cs
+++ /dev/null
@@ -1,48 +0,0 @@
-using System.Text;
-using UnityEngine;
-///
-/// Cache bytes via TextAsset(Editor) or FileBytes(Runtime)
-///
-/// Ref:https://forum.unity.com/threads/how-create-a-textasset-from-external-binary-file.1112608/ #7
-///
-[CreateAssetMenu(menuName = "SO/BytesAsset", fileName = "BytesAsset")]
-public class SOBytesAsset : ScriptableObject
-{
- public byte[] bytes
- {
- get
- {
- return textAsset ? textAsset.bytes : m_Bytes;
- }
- }
- public TextAsset textAsset;
- [HideInInspector] [SerializeField] byte[] m_Bytes;
-
- //public static SOBytesInfo CreateFromString(string text)
- //{
- // var asset = CreateInstance();
- // asset.m_Bytes = Encoding.UTF8.GetBytes(text);
- // return asset;
- //}
-
- /// Warning:
- /// 1.通过读取文件的string转为 TextAsset 时,如果文件后缀不为.bytes,则其读取后的内容可能会被篡改(https://issuetracker.unity3d.com/issues/textasset-dot-bytes-returns-different-bytes-with-different-file-extensions)
- /// 2.如上所述,TextAsset只能用于引用编辑器内部的文件以便访问其bytes,如果从外部加载资源则直接使用bytes进行初始化
- public static SOBytesAsset CreateFromTextAsset(TextAsset text)
- {
- return CreateFromBytes(text.bytes);
- }
- public static SOBytesAsset CreateFromBytes(byte[] bytes)
- {
- var asset = CreateInstance();
- asset.m_Bytes = (byte[])bytes.Clone();
- return asset;
- }
-
- public string text => Encoding.UTF8.GetString(m_Bytes);
- public override string ToString()
- {
- return text;
- }
-
-}
diff --git a/Assets/Threeyes/Core/Base/SO/SOBytesAsset.cs.meta b/Assets/Threeyes/Core/Base/SO/SOBytesAsset.cs.meta
deleted file mode 100644
index 9486a1a..0000000
--- a/Assets/Threeyes/Core/Base/SO/SOBytesAsset.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 987b188f69137354e87985cce2b23898
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Threeyes/Core/Base/SO/SOCollectionBase.cs b/Assets/Threeyes/Core/Base/SO/SOCollectionBase.cs
deleted file mode 100644
index ddca8ac..0000000
--- a/Assets/Threeyes/Core/Base/SO/SOCollectionBase.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-using System.Collections;
-using UnityEngine;
-///
-///
-///
-public abstract class SOCollectionBase : ScriptableObject
-{
- //使SODataGroupBase可以使用foreach(PS:遍历时可以通过指定子元素类型进行转换)(PS:Newtonsoft.Json不支持继承IEnumerable的数据类,否则会报错(https://stackoverflow.com/questions/19080326/deserialize-to-ienumerable-class-using-newtonsoft-json-net))
- public abstract IEnumerator GetEnumerator();
-}
diff --git a/Assets/Threeyes/Core/Base/SO/SOCollectionBase.cs.meta b/Assets/Threeyes/Core/Base/SO/SOCollectionBase.cs.meta
deleted file mode 100644
index 130571e..0000000
--- a/Assets/Threeyes/Core/Base/SO/SOCollectionBase.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: d2f845bf37746d441b50632fc9402aa9
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Threeyes/Core/Base/SO/SOForSceneBase.cs b/Assets/Threeyes/Core/Base/SO/SOForSceneBase.cs
deleted file mode 100644
index d24dfcf..0000000
--- a/Assets/Threeyes/Core/Base/SO/SOForSceneBase.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-using UnityEngine;
-using System.Text;
-
-#if USE_NaughtyAttributes
-using NaughtyAttributes;
-#endif
-
-///
-/// SO that interactive with scene object (eg: SOAction)
-///
-public abstract class SOForSceneBase : ScriptableObject
-{
-#if USE_NaughtyAttributes
- [ResizableTextArea]
-#endif
- public string remark;//(PS:Remark 仅用于SO实例,Component子类就单独增加Remark组件)
-
- public static void OnManualDestroy(SOForSceneBase so, GameObject target, string id = "")
- {
- so.OnManualDestroy(target, id);
- }
- ///
- /// 手动调用的Destroy,保证指定物体的关联实例能销毁(如Tween)
- ///
- ///
- protected virtual void OnManualDestroy(GameObject target, string id = "") { }
-
-
- #region Editor Method
-#if UNITY_EDITOR
-
- ///
- /// Inspector Common Tips
- ///
- ///
- public virtual void SetInspectorGUICommonTextArea(StringBuilder sB, GameObject target, string id = "") { }
-
-#endif
- #endregion
-}
-public static class SOForSceneExtension
-{
- ///
- /// Call Destroy if the param if not null
- ///
- ///
- ///
- public static void OnManualDestroy(this SOForSceneBase so, GameObject target, string id = "")
- {
- if (so && target)
- SOForSceneBase.OnManualDestroy(so, target, id);
- }
-}
diff --git a/Assets/Threeyes/Core/Base/SO/SOForSceneBase.cs.meta b/Assets/Threeyes/Core/Base/SO/SOForSceneBase.cs.meta
deleted file mode 100644
index 99e37c1..0000000
--- a/Assets/Threeyes/Core/Base/SO/SOForSceneBase.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 30824a7db20148a448b0c054980b5fb5
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Threeyes/Core/Base/SO/SOInstacneBase.cs b/Assets/Threeyes/Core/Base/SO/SOInstacneBase.cs
deleted file mode 100644
index 4c66e46..0000000
--- a/Assets/Threeyes/Core/Base/SO/SOInstacneBase.cs
+++ /dev/null
@@ -1,110 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-using UnityEngine.Events;
-using System.IO;
-using Threeyes.Editor;
-
-#if UNITY_EDITOR
-using UnityEditor;
-#endif
-
-///
-/// ScriptableObject资源单例类
-///
-///
-public class SOInstacneBase : ScriptableObject where T : SOInstacneBase
-{
- ///
- ///
- ///
- /// 用于缓存的字段
- /// //该Manager在Resources下的路径
- /// 文件名
- /// 创建后的Action
- ///
- public static T GetOrCreateInstance(ref T _inst, string name, string pathInResources = "", UnityAction actionOnCreate = null)
- {
- //#缓存字段已经有引用,返回(可能是先前调用过)
- if (_inst)
- {
- //Debug.Log("Load From Cache property");
- return _inst;
- }
-
- //#尝试从Resources文件夹中获取
- if (!_inst)
- {
- string filePathinResources = name;
- if (pathInResources != "")
- filePathinResources = pathInResources + "/" + name;
- _inst = ResourceLoad(filePathinResources);
- if (_inst)
- {
- //Debug.Log("Load From Directory: " + localDirectoryPath + "/" + name);
- return _inst;
- }
- }
-
- //#在本地文件夹中创建并获取引用
- if (!_inst)
- {
-#if UNITY_EDITOR
-
- string localDirectoryPath = "Assets/Resources";//Assets/Resources
- if (pathInResources != "")
- localDirectoryPath += "/" + pathInResources;// Assets/Resources/xxx
-
- string absDirPath = EditorPathTool.UnityRelateToAbsPath(localDirectoryPath);
- if (!Directory.Exists(absDirPath))
- {
- //#Editor模式下,通过IO创建文件夹,而不用Unity内置方法AssetDatabase.CreateFolder,因为其一次只能创建一层文件夹)(可能会因为Unity没有更新而报错)(ref:https://forum.unity.com/threads/assetdatabase-create-folders-recursively.787046/)
- Directory.CreateDirectory(absDirPath);
- AssetDatabase.Refresh();
- }
-
- //PS:此时文件夹已经创建,但是Unity未完全刷新,不影响后续操作
- //if (!AssetDatabase.IsValidFolder(localDirectoryPath))
- //{
- // Debug.LogError("Directory not found! Try to manual refresh the editor !");
- // return null;
- //}
-
- _inst = CreateInstance();
- _inst.OnCreate();
- string localFilePath = localDirectoryPath + "/" + name + ".asset";
- actionOnCreate.Execute(_inst);
- AssetDatabase.CreateAsset(_inst, localFilePath);
- AssetDatabase.SaveAssets();
- //Debug.Log("Create " + name + ".asset");
- if (!_inst)
- {
- Debug.LogError("Can't create instance: \r\n" + localFilePath);
- }
-#else
- Debug.LogError("Can't Create instance at Runtime!");
- // 如果仍然没有,就从默认状态中创建一个新的
- // CreateDefaultT函数可以是从JSON文件中读取,并且在实例化完后指明_instance.hideFlags = HideFlags.HideAndDontSave
- //_instance = CreateDefaultT();
-#endif
- }
-
- return _inst;
- }
-
- public static T1 ResourceLoad(string pathInResources)
- where T1 : ScriptableObject
- {
- //便于在运行时获取
- return Resources.Load(pathInResources);
- }
-
- ///
- /// First Create
- ///
- protected virtual void OnCreate()
- {
-
- }
-
-}
diff --git a/Assets/Threeyes/Core/Base/SO/SOInstacneBase.cs.meta b/Assets/Threeyes/Core/Base/SO/SOInstacneBase.cs.meta
deleted file mode 100644
index b6f2735..0000000
--- a/Assets/Threeyes/Core/Base/SO/SOInstacneBase.cs.meta
+++ /dev/null
@@ -1,13 +0,0 @@
-fileFormatVersion: 2
-guid: 9fa67d0a2b037da48bfcdbac8ff67138
-timeCreated: 1527135507
-licenseType: Free
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Threeyes/Core/Base/Sequence.meta b/Assets/Threeyes/Core/Base/Sequence.meta
deleted file mode 100644
index 32b23df..0000000
--- a/Assets/Threeyes/Core/Base/Sequence.meta
+++ /dev/null
@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: caa89a7647923534fb49b9553a8cb904
-folderAsset: yes
-DefaultImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Threeyes/Core/Base/Sequence/Editor.meta b/Assets/Threeyes/Core/Base/Sequence/Editor.meta
deleted file mode 100644
index ac5d62c..0000000
--- a/Assets/Threeyes/Core/Base/Sequence/Editor.meta
+++ /dev/null
@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: c51837418efd68d4ea8c68d8c6ef429f
-folderAsset: yes
-DefaultImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Threeyes/Core/Base/Sequence/Editor/HierarchyView_Sequence.cs b/Assets/Threeyes/Core/Base/Sequence/Editor/HierarchyView_Sequence.cs
deleted file mode 100644
index c31c5c5..0000000
--- a/Assets/Threeyes/Core/Base/Sequence/Editor/HierarchyView_Sequence.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-#if UNITY_EDITOR
-using System.Text;
-using UnityEditor;
-using UnityEngine;
-
-namespace Threeyes.Editor
-{
- ///
- /// PS:因为是通用插件的一部分,所以不依赖于HierarchyViewManager
- ///
- [InitializeOnLoad]
- public static class HierarchyView_Sequence
- {
- static HierarchyView_Sequence()
- {
- //Delegate for OnGUI events for every visible list item in the HierarchyWindow.
- EditorApplication.hierarchyWindowItemOnGUI += HierarchyWindowItemOnGUI;
- }
-
- private static void HierarchyWindowItemOnGUI(int instanceID, Rect selectionRect)
- {
- GameObject go = EditorUtility.InstanceIDToObject(instanceID) as GameObject;
-
- if (!go)
- return;
-
- SequenceAbstract comp = go.GetComponent();
- if (comp)
- {
- EditorDrawerTool.RecordGUIColors();
-
- Rect remainRect = DrawButton(selectionRect, comp);
- EditorDrawerTool.DrawHierarchyViewInfo(remainRect, comp);
-
- EditorDrawerTool.RestoreGUIColors();
- }
- }
-
- private static StringBuilder sbProperty = new StringBuilder();
- private static Rect DrawButton(Rect selectionRect, SequenceAbstract comp)
- {
- Rect remainRect = selectionRect;
- Rect rectEle = remainRect.GetAvaliableRect(EditorDrawerTool.buttonSize);
- if (EditorDrawerTool.DrawButton(rectEle, EditorDrawerTool.TexArrRightIcon))
- comp.SetNext();
- rectEle = remainRect.GetRemainRect(rectEle).GetAvaliableRect(EditorDrawerTool.buttonSize);
- if (EditorDrawerTool.DrawButton(rectEle, EditorDrawerTool.TexArrLeftIcon))
- comp.SetPrevious();
-
- //计算剩余可用长度
- remainRect = remainRect.GetRemainRect(EditorDrawerTool.buttonSize.x * 2 + 4);
- return remainRect;
- }
- }
-}
-#endif
\ No newline at end of file
diff --git a/Assets/Threeyes/Core/Base/Sequence/Editor/HierarchyView_Sequence.cs.meta b/Assets/Threeyes/Core/Base/Sequence/Editor/HierarchyView_Sequence.cs.meta
deleted file mode 100644
index 6239a73..0000000
--- a/Assets/Threeyes/Core/Base/Sequence/Editor/HierarchyView_Sequence.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 33b3e2ce5d926674b8674eacc3bcb3a4
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Threeyes/Core/Base/Sequence/Editor/InspectorView_Sequence.cs b/Assets/Threeyes/Core/Base/Sequence/Editor/InspectorView_Sequence.cs
deleted file mode 100644
index 7c10498..0000000
--- a/Assets/Threeyes/Core/Base/Sequence/Editor/InspectorView_Sequence.cs
+++ /dev/null
@@ -1,52 +0,0 @@
-#if UNITY_EDITOR
-using System.Collections;
-using System.Collections.Generic;
-using UnityEditor;
-using UnityEngine;
-namespace Threeyes.Editor
-{
- ///
- /// inherit to Update Hierarchy
- ///
- [CanEditMultipleObjects]
- [CustomEditor(typeof(SequenceAbstract), true)]//editorForChildClasses
- public class InspectorView_Sequence : InspectorViewSyncWithHierarchyBase
- {
- static bool isFoldOutUnityEvent = true;
-
- private SequenceAbstract targetComp;
-
- public override void OnInspectorGUIFunc()
- {
- targetComp = target as SequenceAbstract;
- if (!targetComp)
- return;
-
- base.OnInspectorGUIFunc();
- DrawUnityEventContent();
- }
-
- GUIPropertyGroup gPPUnityEvent = new GUIPropertyGroup();
- protected virtual void DrawUnityEventContent()
- {
- gPPUnityEvent.Clear();
- targetComp.SetInspectorGUIUnityEventProperty(gPPUnityEvent);
- isFoldOutUnityEvent = DrawFoldOut(gPPUnityEvent, isFoldOutUnityEvent);
- }
-
- protected virtual void FoldOut_SequenceContent()
- {
- EditorGUILayout.PropertyField(serializedObject.FindProperty("onBeforeSet"));
- EditorGUILayout.PropertyField(serializedObject.FindProperty("onSet"));
- EditorGUILayout.PropertyField(serializedObject.FindProperty("onReset"));
- EditorGUILayout.PropertyField(serializedObject.FindProperty("onSetInvalid"));
- EditorGUILayout.PropertyField(serializedObject.FindProperty("onFirst"));
- EditorGUILayout.PropertyField(serializedObject.FindProperty("onFinish"));
- EditorGUILayout.PropertyField(serializedObject.FindProperty("onComplete"));
- EditorGUILayout.PropertyField(serializedObject.FindProperty("onCanSetPrevious"));
- EditorGUILayout.PropertyField(serializedObject.FindProperty("onCanSetNext"));
- EditorGUILayout.PropertyField(serializedObject.FindProperty("onSetPageNumberText"));
- }
- }
-}
-#endif
diff --git a/Assets/Threeyes/Core/Base/Sequence/Editor/InspectorView_Sequence.cs.meta b/Assets/Threeyes/Core/Base/Sequence/Editor/InspectorView_Sequence.cs.meta
deleted file mode 100644
index fb6f69c..0000000
--- a/Assets/Threeyes/Core/Base/Sequence/Editor/InspectorView_Sequence.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 513c563800142f94990f86e8c507578f
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Threeyes/Core/Base/Sequence/SequenceAbstract.cs b/Assets/Threeyes/Core/Base/Sequence/SequenceAbstract.cs
deleted file mode 100644
index af9b30a..0000000
--- a/Assets/Threeyes/Core/Base/Sequence/SequenceAbstract.cs
+++ /dev/null
@@ -1,265 +0,0 @@
-using System;
-using System.Text;
-using Threeyes.Editor;
-using UnityEngine;
-using UnityEngine.Events;
-///
-/// (Mainly used by SequenceHierarchyView)
-///
-public abstract class SequenceAbstract : MonoBehaviour, IHierarchyViewInfo
-{
- #region Networking
-
- public bool IsCommandMode { get { return isCommandMode; } set { isCommandMode = value; } }//Set to true to invoke UnityAction instead
- private bool isCommandMode = false;
- public UnityAction actCommandSetDelta;
- public UnityAction actCommandSet;
- public UnityAction actCommandReset;
-
- public UnityAction actRealSetDelta;
- public UnityAction actRealSet;
- public UnityAction actRealReset;
-
- #endregion
-
- #region Property & Field
-
- [HideInInspector] public IntEvent onBeforeSet;//When the index of Data is begin to Init, the param is target index
- [HideInInspector] public IntEvent onSet;//When the target index of element get set (You can use this to get notify by any set too)
- [HideInInspector] public IntEvent onReset;//When the target index of element get reset (You can use this to get notify by any set too)
- [HideInInspector] public IntEvent onSetInvalid;//When target index can't be set, the param is target index (eg: data not valid or the targetIndex is out of range)
- [HideInInspector] public UnityEvent onFirst;//Cur Data is the first one
- [HideInInspector] public UnityEvent onFinish;//Cur Data is the last one
- [HideInInspector] public UnityEvent onComplete;// Occur when cur index is the first/last one, and you Invoke SetPrevious/SetNext, only valiable when isloop=false(use this to point out that there's no more data in the next/previout index)
- [HideInInspector] public BoolEvent onCanSetPrevious;//(use this to control change page button's state)
- [HideInInspector] public BoolEvent onCanSetNext;// (use this to control change page button's state)
- [HideInInspector] public StringEvent onSetPageNumberText;//Set the page Number(eg: 1/10)
-
- public DataResetType ResetType { get { return resetType; } set { resetType = value; } }
- public bool IsLoop { get { return isLoop; } set { isLoop = value; } }
- public bool IsFirst { get { return CurIndex == 0; } }
- public bool IsLast { get { return CurIndex == Count - 1; } }
- public int CurIndex { get { return curIndex; } set { SetCurIndexFunc(value); } }
- public abstract int Count { get; set; }
- public string StrPageNumber
- {
- get
- {
- string result = "";
- int curIndex = Mathf.Clamp(CurIndex, 0, Count) + 1;
- try
- {
- result = string.Format(formatPageNumber, curIndex, Count);
- }
- catch (System.Exception e)
- {
- Debug.LogError("The Foramt is incorrect!\r\n" + e);
- result = string.Format("{0}/{1}", curIndex, Count); ;
- }
- return result;
- }
- }//Page number
-
- [Header("Sequence")]
- [SerializeField] protected bool isLoop = false;//Loop Or Not
- [SerializeField] protected DataResetType resetType = DataResetType.ResetPrevious;
- [SerializeField] protected string formatPageNumber = "{0}/{1}";
- [SerializeField] protected int curIndex = -1;
-
- #endregion
-
-
- #region Public Method
-
- //——Set Delta——
-
- [ContextMenu("SetPrevious")]
- public void SetPrevious()
- {
- SetDelta(-1);
- }
- [ContextMenu("SetNext")]
- public void SetNext()
- {
- SetDelta(+1);
- }
- public void SetNext(bool isSetNext)
- {
- SetDelta(isSetNext ? 1 : -1);
- }
-
- //——Set——
-
- ///
- /// 重新设置当前数据,常用于重新开始
- ///
- public void SetCur()
- {
- Set(CurIndex);
- }
- public void SetFirst()
- {
- Set(0);
- }
- public void SetLastOne()
- {
- Set(Count - 1);
- }
- public void SetRandom()
- {
- if (Count == 0)
- return;
- Set(UnityEngine.Random.Range(0, Count));
- }
- public void SetAll()
- {
- for (int i = 0; i != Count; i++)
- Set(i);
- }
- [System.Obsolete("Use Set instead")]
- public void SetDataByIndex(int index)
- {
- Set(index);
- }
-
-
- //——Reset——
-
- [ContextMenu("ResetCur")]
- public void ResetCur()
- {
- Reset(CurIndex);
- }
- public void ResetAll(bool isResetIndex = true)
- {
- for (int i = 0; i != Count; i++)
- Reset(i);
-
- if (isResetIndex)
- CurIndex = -1;
- }
-
- //——Entry method——
- public void SetDelta(int delta)
- {
- if (IsCommandMode)
- actCommandSetDelta.Execute(delta);
- else
- {
- actRealSetDelta.Execute(delta);
- SetDeltaFunc(delta);
- }
- }
- public void Set(int index)
- {
- if (IsCommandMode)
- actCommandSet.Execute(index);
- else
- {
- actRealSet.Execute(index);
- SetFunc(index);
- }
- }
- public void Reset(int index)
- {
- if (IsCommandMode)
- actCommandReset.Execute(index);
- else
- {
- actRealReset.Execute(index);
- ResetFunc(index);
- }
- }
-
- #endregion
-
- #region Inner Method
-
- protected abstract bool SetFunc(int index);
- protected abstract bool SetDeltaFunc(int delta);
- protected abstract bool ResetFunc(int index);
- protected virtual void SetCurIndexFunc(int index)
- {
- curIndex = index;
- }
-
- #endregion
-
- #region Define
-
- ///
- /// How to reset others when the new element is set
- ///
- public enum DataResetType
- {
- Null = 0,
- ResetPrevious = 1,//Reset previous Obj(Reset上一个激活的物体)
- ResetAll = 2,//Reset All(Reset所有物体)
- SetAllPreviousAndResetAllNext = 3, //Set all previous and reset all next Objs(Reset在当前Index之后的物体)
- }
- #endregion
-
- #region Obsolete
- [System.Obsolete("Use onBeforeSet Instead")] [HideInInspector] public IntEvent onBeforeSetData;//When the index of Data is begin to Init, the param is target index
- [System.Obsolete("Use onSet Instead")] [HideInInspector] public IntEvent onSetData;//When the index of Data has been Inited, the param is target index
-#if UNITY_EDITOR
- void OnValidate()
- {
-#pragma warning disable CS0618
- EditorVersionUpdateTool.TransferUnityEvent(this, ref onSetData, ref onSet);
- EditorVersionUpdateTool.TransferUnityEvent(this, ref onBeforeSetData, ref onBeforeSet);
-#pragma warning restore CS0618
- }
-#endif
- #endregion
-
- #region Editor Method
-#if UNITY_EDITOR
-
- //——Hierarchy GUI——
-
- //Hierarchy GUI Format: [ Basic Setting | Goup Setting | ID Setting | SubClass Setting ] EventPlayer_Type
- protected static StringBuilder sbCache = new StringBuilder();
- public virtual string ShortTypeName { get { return ""; } }
-
- ///
- /// Set the Type of this
- ///
- ///
- public virtual void SetHierarchyGUIType(StringBuilder sB)
- {
-
- }
-
- public virtual void SetInspectorGUIUnityEventProperty(GUIPropertyGroup group)
- {
- group.title = "Unity Event";
- group.listProperty.Add(new GUIProperty(nameof(onBeforeSet)));
- group.listProperty.Add(new GUIProperty(nameof(onSet)));
- group.listProperty.Add(new GUIProperty(nameof(onReset)));
- group.listProperty.Add(new GUIProperty(nameof(onSetInvalid)));
- group.listProperty.Add(new GUIProperty(nameof(onFirst)));
- group.listProperty.Add(new GUIProperty(nameof(onFinish)));
- group.listProperty.Add(new GUIProperty(nameof(onComplete)));
- group.listProperty.Add(new GUIProperty(nameof(onCanSetPrevious)));
- group.listProperty.Add(new GUIProperty(nameof(onCanSetNext)));
- group.listProperty.Add(new GUIProperty(nameof(onSetPageNumberText)));
- }
-
- ///
- /// Display Property of this EventPlayer
- ///
- ///
- ///
- public virtual void SetHierarchyGUIProperty(StringBuilder sB)
- {
- if (IsLoop)
- {
- sB.Append("Ⓛ ");
- }
- sB.Append(StrPageNumber);
- }
-
-#endif
- #endregion
-}
diff --git a/Assets/Threeyes/Core/Base/Sequence/SequenceAbstract.cs.meta b/Assets/Threeyes/Core/Base/Sequence/SequenceAbstract.cs.meta
deleted file mode 100644
index 2b4d7e5..0000000
--- a/Assets/Threeyes/Core/Base/Sequence/SequenceAbstract.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: ab6510cbe67c1464d8a5975f277476dc
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Threeyes/Core/Base/Sequence/SequenceBase.cs b/Assets/Threeyes/Core/Base/Sequence/SequenceBase.cs
deleted file mode 100644
index 64388fb..0000000
--- a/Assets/Threeyes/Core/Base/Sequence/SequenceBase.cs
+++ /dev/null
@@ -1,345 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-using UnityEngine.Events;
-///
-/// Using Sequence to manage a set of Data
-///
-/// **Created by Threeyes
-///
-///
-public class SequenceBase : SequenceAbstract, IEnumerable
- where TData : class
-{
- #region Property & Field
-
- public UnityAction actionSetData;//Invoke when Data get set, use this for coding
- public UnityAction actionResetData;//Invoke when Data get reset, use this for coding
- public UnityAction actionSetResetData;//Invoke when Data get set/reset, use this for coding(bool means get set/reset)
-
- public override int Count { get { return listData.Count; } set { /*Add this Null Set to support SerializeField*/ } }//Warning:不能是ListData.Count,因为会导致死循环而闪退
- public virtual List ListData { get { return listData; } set { listData = value; UpdateState(); } }
- public TData CurData
- {
- get
- {
- if (CurIndex > 0 && CurIndex < ListData.Count)
- {
- return ListData[CurIndex];
- }
- //Debug.LogError("Current data is null!");
- return null;
- }
- }
-
-
- //[Header("Runtime Info")]
- [SerializeField] protected List listData = new List();
-
- #endregion
-
- #region Public Method
-
- ///
- /// 激活下一个
- ///
- public void ActiveNext()
- {
- int nextIndex = ListData.GetIndex(CurIndex + 1);
- if (!IsDataVaild(nextIndex))
- SetDataValid(ListData[nextIndex]);
- }
-
- public void Active(int index)
- {
- if (!IsDataVaild(index))
- SetDataValid(ListData[index]);
- }
- ///
- /// 激活下一个并调用
- ///
- public void ActiveAndSetNext()
- {
- int nextIndex = ListData.GetIndex(CurIndex + 1);
-
- if (!IsIndexValid(nextIndex))
- {
- Debug.LogError("越界! " + nextIndex + "/" + Count);
- return;
- }
-
- if (!IsDataVaild(nextIndex))
- SetDataValid(ListData[nextIndex]);
- SetDelta(+1);
- }
-
- public void SetData(TData data)
- {
- if (data == null)
- {
- Debug.LogError("The data is null!");
- return;
- }
- int targetIndex = ListData.IndexOf(data);
- if (targetIndex >= 0)
- {
- Set(targetIndex);
- }
- else
- {
- Debug.LogError("The data doesn't exist in List!");
- }
- }
-
- public int FindIndexForData(TData data)
- {
- return ListData.IndexOf(data);
- }
-
- #endregion
-
- #region Inner Method
-
- ///
- /// 设置数据可用
- ///
- ///
- protected virtual void SetDataValid(TData data)
- {
- Debug.LogError("未实现!");
- }
-
- protected virtual bool IsIndexValid(int index)
- {
- if (!ListData.IsIndexValid(index))
- return false;
- return true;
- }
-
- ///
- /// 检查数据是否可用
- ///
- protected virtual bool IsDataVaild(int index)
- {
- if (!IsIndexValid(index))
- return false;
- TData data = ListData[index];
- if (!IsDataVaild(data))
- return false;
-
- return true;
- }
- protected virtual bool IsDataVaild(TData data)
- {
- return data != null;
- }
-
- ///
- /// 获取队列中间隔为delta的数据
- ///
- /// Not 0
- ///
- protected override bool SetDeltaFunc(int delta)
- {
- int nextIndex = CurIndex + delta;
- bool isGetNewData = false;
- if (IsLoop)//循环获取
- {
- nextIndex = ListData.GetIndex(nextIndex);
- if (CurIndex == nextIndex)//页数相同(如只有一页)
- return false;
-
- isGetNewData = true;
- }
- else//普通获取
- {
- if (!ListData.IsIndexValid(nextIndex))//越界
- {
- if (ListData.Count > 0)
- {
- if (nextIndex == 0 || nextIndex >= ListData.Count)
- onComplete.Invoke();//所有数据已经调用完毕,到达头/尾部
- }
- }
- else
- {
- isGetNewData = true;
- }
- }
-
- if (isGetNewData)
- {
- Set(nextIndex);//(Network)保证调用指定的index
- }
- return isGetNewData;
- }
-
- ///
- /// 设置指定序号的数据
- ///
- ///
- /// 是否成功设置
- protected override bool SetFunc(int index)
- {
- if (!IsDataVaild(index))//指定Index无效
- {
- onSetInvalid.Invoke(index);
- return false;
- }
-
- //调用其他Data的Set/Reset方法
- switch (ResetType)
- {
- case DataResetType.ResetPrevious://重置旧Index
- if (IsDataVaild(CurIndex) && (CurIndex != index))
- {
- ResetDataFunc(ListData[CurIndex], CurIndex);
- }
- break;
- case DataResetType.ResetAll://重置所有
- for (int tempIndex = 0; tempIndex != ListData.Count; tempIndex++)
- {
- if (IsDataVaild(tempIndex) && (tempIndex != index))
- ResetDataFunc(ListData[tempIndex], tempIndex);
- }
- break;
- case DataResetType.SetAllPreviousAndResetAllNext:
- for (int tempIndex = 0; tempIndex != ListData.Count; tempIndex++)
- {
- if (IsDataVaild(tempIndex))
- if (tempIndex < index)
- {
- SetDataFunc(ListData[tempIndex], tempIndex);
- }
- else
- {
- ResetDataFunc(ListData[tempIndex], tempIndex);
- }
- }
- break;
- }
-
- //调用新的Data
- //PS:UnityEvent只针对当前的Data,actionSetData才是针对所有Data
- CurIndex = index;
- TData data = ListData[index];
- onBeforeSet.Invoke(index);
- SetDataFunc(data, index);
- onSet.Invoke(index);
-
- if (index == 0) //第一位
- {
- onFirst.Invoke();
- }
- if (index == ListData.Count - 1)//最后一位
- {
- onFinish.Invoke();//在后期移除
- }
- return true;
- }
-
- protected override bool ResetFunc(int index)
- {
- if (!IsDataVaild(index))
- {
- return false;
- }
-
- onReset.Invoke(index);
- ResetDataFunc(ListData[index], index);
- return true;
- }
-
- ///
- /// 处理特定Data
- ///
- ///
- ///
- protected virtual void SetDataFunc(TData data, int index)
- {
- actionSetData.Execute(index, data);
- actionSetResetData.Execute(index, data, true);
- }
-
- ///
- /// 重置特定Data(比如退出界面后重置)
- ///
- ///
- ///
- protected virtual void ResetDataFunc(TData data, int index)
- {
- actionResetData.Execute(index, data);
- actionSetResetData.Execute(index, data, false);
- }
-
- protected override void SetCurIndexFunc(int index)
- {
- base.SetCurIndexFunc(index);
- UpdateState();
- }
- #endregion
-
- #region Interface
-
- public IEnumerator GetEnumerator()
- {
- return ListData.GetEnumerator();
- }
-
- IEnumerator IEnumerable.GetEnumerator()
- {
- return ListData.GetEnumerator();
- }
-
- #endregion
-
- #region Utility
-
- //
- ///
- /// 【测试中】让用户自行初始化UnityEvent,避免随物体生成或AddComent时UnityEvent未初始化导致报错(https://forum.unity.com/threads/unity-event-is-null-right-after-addcomponent.819402/)
- ///
- public void InitUnityEvent()
- {
- onBeforeSet = new IntEvent();
- onSet = new IntEvent();
- onReset = new IntEvent();
- onSetInvalid = new IntEvent();
- onFirst = new UnityEvent();
- onFinish = new UnityEvent();
- onComplete = new UnityEvent();
- onCanSetPrevious = new BoolEvent();
- onCanSetNext = new BoolEvent();
- onSetPageNumberText = new StringEvent();
- }
-
- ///
- /// Update relate state after modify List or Data
- ///
- protected void UpdateState()
- {
- //PSl 在这个方法不能调用ListData,否则会引起死循环。其他地方应该使用ListData,便于子类进行初始化
- bool canPrevious = false;
- bool canNext = false;
-
- if (IsLoop)
- {
- canPrevious = true;
- canNext = true;
-
- if (listData.Count <= 1)
- canPrevious = canNext = false;
- }
- else
- {
- canPrevious = CurIndex != 0;
- canNext = CurIndex != listData.Count - 1;
- }
-
- //Bug:Unity2018通过Hierarchy菜单创建会报错,但是整体不影响使用(原因:当Gameobject首次被创建时,onCanSetPrevious等UnityEvent为null)
- onCanSetPrevious?.Invoke(canPrevious);
- onCanSetNext?.Invoke(canNext);
- onSetPageNumberText?.Invoke(StrPageNumber);
- }
- #endregion
-}
\ No newline at end of file
diff --git a/Assets/Threeyes/Core/Base/Sequence/SequenceBase.cs.meta b/Assets/Threeyes/Core/Base/Sequence/SequenceBase.cs.meta
deleted file mode 100644
index 08e007d..0000000
--- a/Assets/Threeyes/Core/Base/Sequence/SequenceBase.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: a783b68e0cf1d4d419a44742f88f0440
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Threeyes/Core/Base/Sequence/SequenceForCompBase.cs b/Assets/Threeyes/Core/Base/Sequence/SequenceForCompBase.cs
deleted file mode 100644
index 17aa4e5..0000000
--- a/Assets/Threeyes/Core/Base/Sequence/SequenceForCompBase.cs
+++ /dev/null
@@ -1,95 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using System.Text;
-using UnityEngine;
-///
-/// Sequence For Component
-///
-///
-public class SequenceForCompBase : SequenceBase
- where TComp : Component
-{
- #region Property & Field
-
- protected bool IsLoadChildOnAwake { get { return isLoadChildOnAwake; } set { isLoadChildOnAwake = value; } }
-
- public override List ListData
- {
- get
- {
- TryInitData();
- return listData;
- }
-
- set
- {
- base.ListData = value;
- }
- }
-
-
- [SerializeField] protected bool isLoadChildOnAwake = true;//Auto load child's Comp on awake, Set to false if you want to custom list value
-
- #endregion
-
- #region Inner Method
-
- ///
- /// GetComponentFromChild
- ///
- ///
- protected virtual List GetComponentsFromChild()
- {
- List tempList = new List();
- //Only get the first layer by default, including hiding object
- foreach (Transform tfChild in transform)
- {
- var comp = tfChild.GetComponent();
- if (comp)
- {
- tempList.Add(comp);
- }
- }
- return tempList;
- }
-
- #endregion
-
- #region Unity Method
-
- protected virtual void Awake()
- {
- TryInitData();
- }
-
- bool hasInit = false;
- void TryInitData()
- {
- if (!IsLoadChildOnAwake)
- return;
-
- if (Application.isPlaying)
- {
- if (hasInit)//Avoid init multiTime on Play
- return;
- hasInit = true;
- }
-
- listData = GetComponentsFromChild();
- UpdateState();
-
- }
- #endregion
-
- #region Editor Method
-#if UNITY_EDITOR
-
- public override void SetHierarchyGUIProperty(StringBuilder sB)
- {
- TryInitData();//Manual Update Info
- base.SetHierarchyGUIProperty(sB);
- }
-
-#endif
- #endregion
-}
diff --git a/Assets/Threeyes/Core/Base/Sequence/SequenceForCompBase.cs.meta b/Assets/Threeyes/Core/Base/Sequence/SequenceForCompBase.cs.meta
deleted file mode 100644
index a03d919..0000000
--- a/Assets/Threeyes/Core/Base/Sequence/SequenceForCompBase.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 111ebda9bc6e323448fc5dc02d4f6ead
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Threeyes/Core/Base/UI.meta b/Assets/Threeyes/Core/Base/UI.meta
deleted file mode 100644
index 5f7de9d..0000000
--- a/Assets/Threeyes/Core/Base/UI.meta
+++ /dev/null
@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: 748c594ce3520a84b98937825e9f076e
-folderAsset: yes
-DefaultImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Threeyes/Core/Base/UI/ContentElementBase.cs b/Assets/Threeyes/Core/Base/UI/ContentElementBase.cs
deleted file mode 100644
index 80d5d98..0000000
--- a/Assets/Threeyes/Core/Base/UI/ContentElementBase.cs
+++ /dev/null
@@ -1,49 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-///
-/// 基于Content的元素
-///
-///
-public class ContentElementBase : ElementBase, IContentElement
- where TUIManager : UIContentPanelBase
- where TElement : ElementBase
- where TData : class
-{
- public TUIManager UIManager
- {
- get
- {
- return uIManager;
- }
- set
- {
- uIManager = value;
- }
- }
- [SerializeField] protected TUIManager uIManager;
-
-
- ///
- /// Index in content
- ///
- public int Index
- {
- get
- {
- return index;
- }
- set
- {
- index = value;
- }
- }
-
- [SerializeField] protected int index;
-}
-
-public interface IContentElement
-{
- TUIManager UIManager { get; set; }
- int Index { get; set; }
-}
diff --git a/Assets/Threeyes/Core/Base/UI/ContentElementBase.cs.meta b/Assets/Threeyes/Core/Base/UI/ContentElementBase.cs.meta
deleted file mode 100644
index 2caa942..0000000
--- a/Assets/Threeyes/Core/Base/UI/ContentElementBase.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 41cb3de99fffe0240af52088800e1ad8
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Threeyes/Core/Base/UI/Editor.meta b/Assets/Threeyes/Core/Base/UI/Editor.meta
deleted file mode 100644
index 7687d60..0000000
--- a/Assets/Threeyes/Core/Base/UI/Editor.meta
+++ /dev/null
@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: d8840c852092cd541819e192ec89cbc7
-folderAsset: yes
-DefaultImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Threeyes/Core/Base/UI/Editor/HierarchyViewManager_UI.cs b/Assets/Threeyes/Core/Base/UI/Editor/HierarchyViewManager_UI.cs
deleted file mode 100644
index be43d67..0000000
--- a/Assets/Threeyes/Core/Base/UI/Editor/HierarchyViewManager_UI.cs
+++ /dev/null
@@ -1,68 +0,0 @@
-#if UNITY_EDITOR
-using UnityEditor;
-using UnityEngine;
-using UnityEngine.UI;
-
-namespace Threeyes.Editor
-{
- [InitializeOnLoad]
- public static class HierarchyViewManager_UI
- {
- static HierarchyViewManager_UI()
- {
- EditorApplication.hierarchyWindowItemOnGUI += HierarchyWindowItemOnGUI;
- }
-
- static void HierarchyWindowItemOnGUI(int instanceID, Rect selectionRect)
- {
- GameObject go = EditorUtility.InstanceIDToObject(instanceID) as GameObject;
-
- if (!go)
- return;
-
- EditorDrawerTool.RecordGUIColors();
-
- DrawUGUI(selectionRect, go);
-
- EditorDrawerTool.RestoreGUIColors();
- }
-
- static void DrawUGUI(Rect selectionRect, GameObject go)
- {
- Button button = go.GetComponent