Exemple #1
0
        public Vector2[] GetMeshUV1s(Mesh m, SA2LogLevel LOG_LEVEL)
        {
            Vector2[] uv;
#if (UNITY_4_6 || UNITY_4_5 || UNITY_4_3 || UNITY_4_2 || UNITY_4_1 || UNITY_4_0_1 || UNITY_4_0 || UNITY_3_5)
            uv = m.uv1;
#else
            if (LOG_LEVEL >= SA2LogLevel.warn)
            {
                SA2Log.LogDebug("UV1 does not exist in Unity 5+");
            }
            uv = m.uv;
#endif
            if (uv.Length == 0)
            {
                if (LOG_LEVEL >= SA2LogLevel.debug)
                {
                    SA2Log.LogDebug("Mesh " + m + " has no uv1s. Generating");
                }
                if (LOG_LEVEL >= SA2LogLevel.warn)
                {
                    Debug.LogWarning("Mesh " + m + " didn't have uv1s. Generating uv1s.");
                }
                uv = new Vector2[m.vertexCount];
                for (int i = 0; i < uv.Length; i++)
                {
                    uv[i] = _HALF_UV;
                }
            }
            return(uv);
        }
Exemple #2
0
 public void LogDebug(string msg, params object[] args)
 {
     _CacheLogMessage(SA2Log.LogDebug(msg, args));
 }