public MapBrush(string name, GameObject parent, GetOffsetDelegate getOffset, HideFlags flag) { root = new GameObject(name); root.transform.parent = parent.transform; this.parent = root; this.GetOffset = getOffset; //this.mat = new Material(Shader.Find("Transparent/Diffuse")); Material mat = new Material("Shader \"Alpha Additive\" {" + "Properties { _Color (\"Main Color\", Color) = (1,1,1,0) }" + "SubShader {" + " Tags { \"Queue\" = \"Transparent +2001\" }" + " Pass {" + " Blend One OneMinusSrcAlpha " +// "ZTest Off" + " ZWrite Off Cull Off Fog { Mode Off } " + " Material { Diffuse [_Color] Ambient [_Color] }" + " Lighting On" + " SetTexture [_Dummy] { combine primary double, primary }" + " }" + "}" + "}"); this.mat = mat; this.mat.color = new Color(1, 1, 1, 1f); subObjs = new List<GameObject>(); size = 1; IsShowing = false; enabledCount = 1; SetBrushSize(size, flag); }
public PartialStream( Stream baseStream, GetOffsetDelegate getOffsetDelegate, GetLengthDelegate getLengthDelegate, SetLengthDelegate setLengthDelegate = null) { this.baseStream = baseStream; this.getOffsetDelegate = getOffsetDelegate; this.getLengthDelegate = getLengthDelegate; this.setLengthDelegate = setLengthDelegate; }