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;
|
||||
}
|
||||
|
||||
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()
|
||||
{
|
||||
size = 0;
|
||||
|
||||
@@ -24,10 +24,6 @@ public class UIDrawCall : MonoBehaviour
|
||||
[HideInInspector]
|
||||
public int widgetCount;
|
||||
|
||||
[NonSerialized]
|
||||
[HideInInspector]
|
||||
public UIPanel manager;
|
||||
|
||||
[NonSerialized]
|
||||
[HideInInspector]
|
||||
public UIPanel panel;
|
||||
@@ -56,66 +52,10 @@ public class UIDrawCall : MonoBehaviour
|
||||
[NonSerialized]
|
||||
private bool mTextureClip;
|
||||
|
||||
private static List<int[]> mCache = new List<int[]>(10);
|
||||
|
||||
private static int[] ClipRange = 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
|
||||
{
|
||||
get
|
||||
@@ -265,22 +205,6 @@ public class UIDrawCall : MonoBehaviour
|
||||
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()
|
||||
{
|
||||
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()
|
||||
{
|
||||
int num = mInactiveList.size;
|
||||
|
||||
@@ -10,10 +10,6 @@ public class UIGeometry
|
||||
|
||||
private BetterList<Vector3> mRtpVerts = new BetterList<Vector3>();
|
||||
|
||||
private Vector3 mRtpNormal;
|
||||
|
||||
private Vector4 mRtpTan;
|
||||
|
||||
public bool hasVertices => verts.size > 0;
|
||||
|
||||
public void Clear()
|
||||
|
||||
@@ -13,7 +13,6 @@ public class UIPanel : UIRect
|
||||
|
||||
public delegate void OnGeometryUpdated();
|
||||
public delegate void OnClippingMoved(UIPanel panel);
|
||||
public int startingRenderQueue = 3000;
|
||||
public int depth;
|
||||
public UIDrawCall.Clipping clipping;
|
||||
public Vector4 baseClipRegion;
|
||||
|
||||
Reference in New Issue
Block a user