public CoreMesh(GameObject meshRoot, GameObject root, string name) { this.name = name; this.Root = root; meshContainer = new GameObject(name); meshContainer.transform.parent = meshRoot.transform; meshRenderer = (SkinnedMeshRenderer)meshContainer.AddComponent(typeof(SkinnedMeshRenderer)); meshRenderer.sharedMesh = new Mesh(); geometry = meshRenderer.sharedMesh; boneWeightsList = new List<BoneWeight>(); vertices = new List<Vector3>(); normals = new List<Vector3>(); uvcoords0 = new List<Vector2>(); uvcoords1 = new List<Vector2>(); colors=new List<Color>(); brush=null; faces = new List<int>(); }
private static void readBRUS() { int n_texes = file.ReadInt32(); while (getChunkSize()!=0) { B3Brush brush = new B3Brush(); brush.name="brush_"+ readstring(); brush.color = ReadColor(); brush.shiness=file.ReadSingle();//shiness brush.blend= file.ReadInt32();//blend int fx = file.ReadInt32();//fx brush.numTextures=n_texes; trace("num textures in brush:" + n_texes+" name :"+ brush.name); for (int i=0; i < n_texes ; i++) { int textid = file.ReadInt32();//texid if (textures.Count > 0) { brush.textures.Add(textures[textid]); } } brushes.Add(brush); } }