예제 #1
0
        public ElementBlock(ElementData e, int c1, int c2, int c3)
        {
            this.element = e;
            this.colors = new List<int>();
            this.colors.Add(c1);
            this.colors.Add(c2);
            this.colors.Add(c3);
            this.attachmentIsActive = false;

            // is everything correct?
            if(e.dyeSplat == null)
                Debug.LogError("UMAElements.ElementBlock: Attempted creation of a dyable element '" + e.Name + "' with no splat map.");
            if(e.dyeSplat.width != e.overlayItem.asset.textureList[0].width || e.dyeSplat.height != e.overlayItem.asset.textureList[0].height)
                Debug.LogError("UMAElements.ElementBlock: Dyable Element '" + e.Name +
                    "' has a splat map of different size to the overlay '" + e.overlayItem.asset.name + "' it represents.");

            // make the new blank texture
            dyedDiffuse = new Texture2D(e.overlayItem.asset.textureList[0].width, e.overlayItem.asset.textureList[0].height, TextureFormat.ARGB32, false);

            // call the thread or make the texture - this suffers because
            // after it's complete the UMA atlas needs rebuilding
            // NEEDS SORTING OUT
            //Thread t = new Thread(MakeDyedTexture);
            MakeDyedTexture();
        }
예제 #2
0
 public ElementBlock(ElementData e, int c1)
 {
     this.element = e;
     this.colors = new List<int>();
     this.colors.Add(c1);
     this.attachmentIsActive = false;
 }
예제 #3
0
 public void OnEnable()
 {
     element = target as ElementData;
 }
예제 #4
0
 public ElementBlock(ElementData e, Color32 color)
 {
     this.element = e;
     this.color = color;
     this.attachmentIsActive = false;
 }
예제 #5
0
 public ElementBlock(ElementData e, Color32 color)
 {
     this.element            = e;
     this.color              = color;
     this.attachmentIsActive = false;
 }
예제 #6
0
 public ElementBlock(ElementData e)
 {
     this.element            = e;
     this.colors             = new List <int>();
     this.attachmentIsActive = false;
 }
 public void Add(ElementData ed)
 {
     ed.Index = nextID++;
     UnityEditor.EditorUtility.SetDirty(ed);
     ElementList.Add(ed);
     UpdateStatic();
 }