コード例 #1
0
    static void weld()
    {
//		file = EditorGUILayout.TextField ("Text Field", file);
        mesh = Selection.activeGameObject.GetComponent <MeshFilter> ().sharedMesh;

        weldedMesh = Weld.CopyMesh(mesh);
        AssetDatabase.CreateAsset(weldedMesh, file);
        AssetDatabase.SaveAssets();
//		WeldMesh window = (WeldMesh)EditorWindow.GetWindow (typeof (WeldMesh));
    }
コード例 #2
0
        void Start()
        {
            finishedBuilding = false;
            nodes            = GetComponent <ON_NodeGraph> ().Nodes; // new List<ON_Node>();
            edges            = GetComponent <ON_NodeGraph> ().Edges; // new List<ON_Node>();

            if (!weld)
            {
                weldedMesh = mesh;
            }
            else
            {
                weldedMesh = Weld.CopyMesh(mesh);
            }

            Weld.AutoWeld(weldedMesh, .0000001f, 15f);

            if (GraphParent == null)
            {
                GraphParent = this.gameObject;
            }

            StartCoroutine(instanceNodes());
        }