Exemplo n.º 1
0
        public override void OnEnable()
        {
            base.OnEnable();
            cloth = (ObiTearableCloth)target;

            particlePropertyNames.AddRange(new string[] { "Tear Resistance" });
        }
Exemplo n.º 2
0
        public override void OnEnable()
        {
            base.OnEnable();
            cloth = (ObiTearableCloth)target;

            particlePropertyNames.AddRange(new string[] { "Tear Resistance" });

            // show wireframe
            EditorUtility.SetSelectedWireframeHidden(cloth.GetComponent <Renderer>(), false);
        }
Exemplo n.º 3
0
        static void CreateObiClothWithSolver()
        {
            GameObject c = new GameObject("Obi Tearable Cloth");

            Undo.RegisterCreatedObjectUndo(c, "Create Obi Tearable Cloth");
            c.AddComponent <MeshFilter>();
            c.AddComponent <MeshRenderer>();
            ObiTearableCloth cloth  = c.AddComponent <ObiTearableCloth>();
            ObiSolver        solver = c.AddComponent <ObiSolver>();

            cloth.Solver = solver;
        }