// Use this for initialization
        void Start()
        {
            prism = Camera.main.GetComponent <PrismEffects>();

            if (!prism)
            {
                Debug.LogWarning("Main camera had no PRISM on it! Can't initialize demo script.");
                enabled = false;
            }
        }
示例#2
0
    void GetTargetPRISM()
    {
        targetPRISM = targetCamera.GetComponent <PrismEffects>();

        if (targetPRISM == null)
        {
            Debug.LogWarning("Could not find a PRISM Effects script on your target/main camera!");
            return;
        }

        lastPreset = targetPRISM.currentPrismPreset;

        if (GetComponent <PrismEffects>() == targetPRISM && isMainVolume == false)
        {
#if UNITY_EDITOR
            //Debug.Log("Main volume set to: " + gameObject.name + ". All new PRISM Volumes will take initial settings from this volume.");
#endif
            volumeRange  = 1f;
            volumeSize   = new Vector3(1f, 1f, 1f);
            isMainVolume = true;
        }
    }
 // Use this for initialization
 void Start()
 {
     gControl = GetComponent <GameController>();
     pEffects = FindObjectOfType <PrismEffects>();
     sun      = FindObjectOfType <Light>();
 }