public void Init(WMG_Bezier_Band_Graph graph) { this.graph = graph; // theGraph.setTextureMaterial(areaShadingRects[i], matToUse); bandFillSprite = WMG_Util.createSprite(getTexture(bandFillSpriteGO)); bandLineSprite = WMG_Util.createSprite(getTexture(bandLineSpriteGO)); // bandFillSprite = WMG_Util.createAlphaSprite(1024); // bandLineSprite = WMG_Util.createAlphaSprite(1024); // bandBotLineSprite = WMG_Util.createSprite(getTexture(bandBotLineSpriteGO)); texSize = bandFillSprite.texture.width; // texSize = 1024; bandFillColors = new Color[texSize * texSize]; bandLineColors = new Color[texSize * texSize]; // bandBotLineColors = new Color[texSize * texSize]; setTexture(bandFillSpriteGO, bandFillSprite); setTexture(bandLineSpriteGO, bandLineSprite); // setTexture(bandBotLineSpriteGO, bandBotLineSprite); size = Mathf.RoundToInt(Mathf.Sqrt(bandFillColors.Length)); // size = 1024; maxS = size - 1; // setTextureMaterial(bandFillSpriteGO, graph.uiGradient); // setTextureMaterial(bandLineSpriteGO, graph.uiGradient); // bandFillMat = getTextureMaterial(bandFillSpriteGO); // bandLineMat = getTextureMaterial(bandLineSpriteGO); }
public void Init(WMG_Bezier_Band_Graph graph) { this.graph = graph; texSize = graph.textureResolution; bandFillSprite = WMG_Util.createSprite(texSize, texSize); bandLineSprite = WMG_Util.createSprite(texSize, texSize); bandFillColors = new Color[texSize * texSize]; bandLineColors = new Color[texSize * texSize]; setTexture(bandFillSpriteGO, bandFillSprite); setTexture(bandLineSpriteGO, bandLineSprite); }
public void OnEnable() { graph = (WMG_Bezier_Band_Graph)target; fields = GetProperties(graph); }