I am following a game tutorial to create a simple RPG and when I try to add the Bloom script from the standard assets package to something i get an error that says “Can’t add script behaviour ExtinguishableParticleSystem. The script need to derive from MonoBehavior!” How can I fix this?
I think this should be moved to the scripting subforum.
Any script that you want to attach to gameobjects has to be a class derived from Monobehavior(that’s where it gets the whole attach to gameobjects behavior in the first place. If you create a class through the IDE, you will notice how there is always " : Monobehavior" in the default class Unity sets up for you.
public class MyClass : Monobehaviour
{
etc...
}
That means it is inheriting all the stuff the Monobehaviour class does(which includes the part about adding the script class to objects). If ExtinguishableParticleSystem is missing that line, then it won’t be derived from Monobehaviour. You CAN have classes like that, but they can’t be attached to Gameobjects, rather they would be something you can create in code.