Esempio n. 1
0
 /// <summary>
 /// 将名字转换(去除标记性字符)
 /// </summary>
 /// <returns></returns>
 public Data.ImgNode Analyzing(RuleObject Rule, string name)
 {
     this.Name           = Rule.AnalySisImgName(name, out source, out type);
     this.customNameType = Rule.nameType;
     this.forceAddress   = Rule.forceAddress;
     //添加后缀
     if (texture != null)
     {
         this.hashImage    = rect.GetHashCode();
         this.texture.name = TextureName;
         //Debug.Log(TextureName);
     }
     return(this);
 }
Esempio n. 2
0
 public static Texture GetPreviewIcon(PreviewItem item, Data.RuleObject rule)
 {
     RuleObj = rule;
     if (rule == null || item.layerType != LayerType.Group)
     {
         return(previewIcons[item.layerType.ToString()]);
     }
     else
     {
         string   groupType = PSDUnityConst.emptySuffix;
         string[] args;
         rule.AnalysisGroupName(item.name, out groupType, out args);
         if (!previewIcons.ContainsKey(groupType))
         {
             previewIcons[groupType] = LoadTexture(groupType);
         }
         return(previewIcons[groupType]);
     }
 }
Esempio n. 3
0
 public static void InitEnviroment(Data.RuleObject ruleObj)
 {
     RuleObj = ruleObj;
 }