Beispiel #1
0
        private void SetIconDicingPattern(AssetFile file, string pattern)
        {
            DicingImage    image       = this.ChangeIconComponent <DicingImage>();
            DicingTextures unityObject = file.UnityObject as DicingTextures;

            image.DicingData = unityObject;
            image.ChangePattern(pattern);
            image.UvRect = new Rect(0f, 0f, 1f, 1f);
            this.ChangeReference(file, image.get_gameObject());
        }
Beispiel #2
0
        private void SetIconDicing(AdvGraphicInfo graphic, Rect rect)
        {
            DicingImage    image       = this.ChangeIconComponent <DicingImage>();
            DicingTextures unityObject = graphic.File.UnityObject as DicingTextures;
            string         subFileName = graphic.SubFileName;

            image.DicingData = unityObject;
            image.ChangePattern(subFileName);
            float width  = image.PatternData.Width;
            float height = image.PatternData.Height;

            image.UvRect = rect.ToUvRect(width, height);
            this.ChangeReference(graphic.File, image.get_gameObject());
        }