cull(engine-cleanup): pass-9 cascade round 3 after UIPanel stub
This commit is contained in:
@@ -33,26 +33,6 @@ public class BetterList<T>
|
|||||||
buffer = array;
|
buffer = array;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Trim()
|
|
||||||
{
|
|
||||||
if (size > 0)
|
|
||||||
{
|
|
||||||
if (size < buffer.Length)
|
|
||||||
{
|
|
||||||
T[] array = new T[size];
|
|
||||||
for (int i = 0; i < size; i++)
|
|
||||||
{
|
|
||||||
array[i] = buffer[i];
|
|
||||||
}
|
|
||||||
buffer = array;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
buffer = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Clear()
|
public void Clear()
|
||||||
{
|
{
|
||||||
size = 0;
|
size = 0;
|
||||||
|
|||||||
@@ -24,10 +24,6 @@ public class UIDrawCall : MonoBehaviour
|
|||||||
[HideInInspector]
|
[HideInInspector]
|
||||||
public int widgetCount;
|
public int widgetCount;
|
||||||
|
|
||||||
[NonSerialized]
|
|
||||||
[HideInInspector]
|
|
||||||
public UIPanel manager;
|
|
||||||
|
|
||||||
[NonSerialized]
|
[NonSerialized]
|
||||||
[HideInInspector]
|
[HideInInspector]
|
||||||
public UIPanel panel;
|
public UIPanel panel;
|
||||||
@@ -56,66 +52,10 @@ public class UIDrawCall : MonoBehaviour
|
|||||||
[NonSerialized]
|
[NonSerialized]
|
||||||
private bool mTextureClip;
|
private bool mTextureClip;
|
||||||
|
|
||||||
private static List<int[]> mCache = new List<int[]>(10);
|
|
||||||
|
|
||||||
private static int[] ClipRange = null;
|
private static int[] ClipRange = null;
|
||||||
|
|
||||||
private static int[] ClipArgs = null;
|
private static int[] ClipArgs = null;
|
||||||
|
|
||||||
public int renderQueue
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return mRenderQueue;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if (mRenderQueue != value)
|
|
||||||
{
|
|
||||||
mRenderQueue = value;
|
|
||||||
if (mDynamicMat != null)
|
|
||||||
{
|
|
||||||
mDynamicMat.renderQueue = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public int sortingOrder
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
if (!(mRenderer != null))
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return mRenderer.sortingOrder;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if (mRenderer != null && mRenderer.sortingOrder != value)
|
|
||||||
{
|
|
||||||
mRenderer.sortingOrder = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public Material baseMaterial
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return mMaterial;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if (mMaterial != value)
|
|
||||||
{
|
|
||||||
mMaterial = value;
|
|
||||||
mRebuildMat = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public Texture mainTexture
|
public Texture mainTexture
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -265,22 +205,6 @@ public class UIDrawCall : MonoBehaviour
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Material RebuildMaterial()
|
|
||||||
{
|
|
||||||
NGUITools.DestroyImmediate(mDynamicMat);
|
|
||||||
CreateMaterial();
|
|
||||||
mDynamicMat.renderQueue = mRenderQueue;
|
|
||||||
if (mTexture != null)
|
|
||||||
{
|
|
||||||
mDynamicMat.mainTexture = mTexture;
|
|
||||||
}
|
|
||||||
if (mRenderer != null)
|
|
||||||
{
|
|
||||||
mRenderer.sharedMaterials = new Material[1] { mDynamicMat };
|
|
||||||
}
|
|
||||||
return mDynamicMat;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
if (ClipRange == null)
|
if (ClipRange == null)
|
||||||
@@ -305,26 +229,6 @@ public class UIDrawCall : MonoBehaviour
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static UIDrawCall Create(string name)
|
|
||||||
{
|
|
||||||
if (mInactiveList.size > 0)
|
|
||||||
{
|
|
||||||
UIDrawCall uIDrawCall = mInactiveList.Pop();
|
|
||||||
mActiveList.Add(uIDrawCall);
|
|
||||||
if (name != null)
|
|
||||||
{
|
|
||||||
uIDrawCall.name = name;
|
|
||||||
}
|
|
||||||
NGUITools.SetActive(uIDrawCall.gameObject, state: true);
|
|
||||||
return uIDrawCall;
|
|
||||||
}
|
|
||||||
GameObject obj = new GameObject(name);
|
|
||||||
UnityEngine.Object.DontDestroyOnLoad(obj);
|
|
||||||
UIDrawCall uIDrawCall2 = obj.AddComponent<UIDrawCall>();
|
|
||||||
mActiveList.Add(uIDrawCall2);
|
|
||||||
return uIDrawCall2;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void ReleaseInactive()
|
public static void ReleaseInactive()
|
||||||
{
|
{
|
||||||
int num = mInactiveList.size;
|
int num = mInactiveList.size;
|
||||||
|
|||||||
@@ -10,10 +10,6 @@ public class UIGeometry
|
|||||||
|
|
||||||
private BetterList<Vector3> mRtpVerts = new BetterList<Vector3>();
|
private BetterList<Vector3> mRtpVerts = new BetterList<Vector3>();
|
||||||
|
|
||||||
private Vector3 mRtpNormal;
|
|
||||||
|
|
||||||
private Vector4 mRtpTan;
|
|
||||||
|
|
||||||
public bool hasVertices => verts.size > 0;
|
public bool hasVertices => verts.size > 0;
|
||||||
|
|
||||||
public void Clear()
|
public void Clear()
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ public class UIPanel : UIRect
|
|||||||
|
|
||||||
public delegate void OnGeometryUpdated();
|
public delegate void OnGeometryUpdated();
|
||||||
public delegate void OnClippingMoved(UIPanel panel);
|
public delegate void OnClippingMoved(UIPanel panel);
|
||||||
public int startingRenderQueue = 3000;
|
|
||||||
public int depth;
|
public int depth;
|
||||||
public UIDrawCall.Clipping clipping;
|
public UIDrawCall.Clipping clipping;
|
||||||
public Vector4 baseClipRegion;
|
public Vector4 baseClipRegion;
|
||||||
|
|||||||
@@ -341,7 +341,6 @@ public void Play(int hash, int layer, float normalizedTime) { }
|
|||||||
public Vector3 WorldToScreenPoint(Vector3 p) => p;
|
public Vector3 WorldToScreenPoint(Vector3 p) => p;
|
||||||
public Ray ScreenPointToRay(Vector3 p) => default;
|
public Ray ScreenPointToRay(Vector3 p) => default;
|
||||||
}
|
}
|
||||||
public enum CameraClearFlags { }
|
|
||||||
public partial struct CharacterInfo { }
|
public partial struct CharacterInfo { }
|
||||||
|
|
||||||
// ---- coroutine machinery (never pumped headless; types must exist) ----
|
// ---- coroutine machinery (never pumped headless; types must exist) ----
|
||||||
|
|||||||
Reference in New Issue
Block a user