Пример #1
0
        private void OnEnable()
        {
            odData = target as LodData;
            string iconPat = "Assets/Editor/LOD/ico.png";
            var    ico     = AssetDatabase.LoadAssetAtPath <Texture2D>(iconPat);

            icon = new GUIContent(ico);
        }
Пример #2
0
 static void CreateFaceData()
 {
     if (!File.Exists(dataPat))
     {
         LodData od = ScriptableObject.CreateInstance <LodData>();
         AssetDatabase.CreateAsset(od, dataPat);
         AssetDatabase.ImportAsset(dataPat);
         AssetDatabase.Refresh();
     }
 }
Пример #3
0
 private void OnEnable()
 {
     config = AssetDatabase.LoadAssetAtPath <LodData>(LodDataEditor.dataPat);
     roles  = config.nodes.Select(x => x.desc).ToArray();
     if (m_LODs == null)
     {
         m_LODs = new List <LODAsset>();
         for (int i = 0; i < m_NumberOfLODs; i++)
         {
             LODAsset oDAsset = new LODAsset();
             oDAsset.screenPercentage = (m_NumberOfLODs - i) * 0.25f;
             m_LODs.Add(oDAsset);
         }
     }
 }