Пример #1
0
    static public void CreateSphereVolume()
    {
        GameObject newObject = new GameObject("Cone Volume");

        if (SceneView.currentDrawingSceneView)
        {
            SceneView.currentDrawingSceneView.MoveToView(newObject.transform);
        }
        ConeVolume coneVolume = (ConeVolume)newObject.AddComponent <ConeVolume>();

        coneVolume.enabled = false;
        coneVolume.enabled = true;
    }
Пример #2
0
    static public void CreateVolume()
    {
        GameObject newObject = new GameObject("Cone Volume");

        if (UnityEditor.SceneView.currentDrawingSceneView)
        {
            UnityEditor.SceneView.currentDrawingSceneView.MoveToView(newObject.transform);
        }
        ConeVolume coneVolume = (ConeVolume)newObject.AddComponent <ConeVolume>();

        coneVolume.volumeShader = "Advanced SS/Volumetric/Cone Volume";
        coneVolume.enabled      = false;
        coneVolume.enabled      = true;
    }
Пример #3
0
        protected void Result_Сone_Btn_Click(object sender, EventArgs e)
        {
            ConeVolume cone = new ConeVolume(Convert.ToInt32(R.Text), Convert.ToInt32(h.Text));

            result.Text = Convert.ToString(cone.CalcCapacity());
        }