Exemplo n.º 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);
        }
Exemplo n.º 2
0
 public void Trace(string msg, params object[] args)
 {
     _CacheLogMessage(SA2Log.Trace(msg, args));
 }
Exemplo n.º 3
0
 public void LogDebug(string msg, params object[] args)
 {
     _CacheLogMessage(SA2Log.LogDebug(msg, args));
 }
Exemplo n.º 4
0
 public void Info(string msg, params object[] args)
 {
     _CacheLogMessage(SA2Log.Info(msg, args));
 }
Exemplo n.º 5
0
 public void Warn(string msg, params object[] args)
 {
     _CacheLogMessage(SA2Log.Warn(msg, args));
 }
Exemplo n.º 6
0
 public void Error(string msg, params object[] args)
 {
     _CacheLogMessage(SA2Log.Error(msg, args));
 }
Exemplo n.º 7
0
 public void Log(SA2LogLevel l, String msg, SA2LogLevel currentThreshold)
 {
     SA2Log.Log(l, msg, currentThreshold);
     _CacheLogMessage(msg);
 }