예제 #1
0
 public CcData(Type type, bool single, BGCc.CcDescriptor ccDescriptor)
     : this(type, single, ccDescriptor.Name)
 {
     Description = ccDescriptor.Description;
     if (!String.IsNullOrEmpty(ccDescriptor.Image))
     {
         Icon = BGEditorUtility.LoadCcTexture2D(ccDescriptor.Image) ?? noImage;
     }
 }
예제 #2
0
 public CcData(Type type, bool single, BGCc.CcDescriptor ccDescriptor)
     : this(type, single, ccDescriptor.Name)
 {
     Description = ccDescriptor.Description;
     if (!string.IsNullOrEmpty(ccDescriptor.Icon))
     {
         var texture = BGPrivateField.Get <BGEditorIcon>(typeof(BGBinaryResources), ccDescriptor.Icon);
         if (texture != null)
         {
             Icon = texture;
         }
     }
     else if (!string.IsNullOrEmpty(ccDescriptor.Image))
     {
         Icon = BGEditorUtility.LoadCcTexture2D(ccDescriptor.Image);
     }
 }