Quantcast
Channel: Questions in topic: "error message"
Viewing all articles
Browse latest Browse all 2891

C#- Activate Image effect Help

$
0
0
Hello, i have a small problem: I want that if my health points are under 25- the image effect calles CameraMationBlur on the main camera is enabled. the script must be attached to my player, so i wrote: public GameObject cam; if (hitPoints <= 25.0f){ cam = GameObject.FindGameObjectWithTag ("MainCamera"); cam.GetComponent(); CameraMotionBlur.enabled = true; } ... it doesnt work. i always get this error :( KerboEngine/Scripts/Player/PlayerCore.cs(1075,42): error CS0120: An object reference is required to access non-static member `UnityEngine.Behaviour.enabled' and KerboEngine//Scripts/Player/PlayerCorer.cs(1073,25): error CS0029: Cannot implicitly convert type `UnityEngine.GameObject[]' to `UnityEngine.Camera' :( Thanks for help :)

Viewing all articles
Browse latest Browse all 2891

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>