Waring, using new keyword on monovehaviour. When im not using monobehaviour!?
Hey seems im in a little bit of a pickle. and yes i know you can't use new with when you inherit from monobehaviour and you should use .addcomponent. however im not using monobehaviour in my class, and yes im getting this issue when im creating a new list of this class without any base class. you can see what i mean in the code below. wondering if im missing anything?
Also im wanting the resource class to be Serializable so i can see it in the inspector. but yet im getting the warning of cant use new keyword on monobehaviour. even when my resource class is not inheriting from it
Class im using in my list:
Line im getting the issue on:
$$anonymous$$aybe there are two resource classes... one is a mono the other one isn't. $$anonymous$$ake sure the resource class in the list is the one you made.
Thanks for the quick response @Vega4Life but seems as so i do not have any other classes named the same. i do also have same list setup in another script yet that one does not produce the warning which is a little odd
but to expand on your idea im thinking unity may have a built in class called the same when handling resource folder when loading assets in. ill give it a quick rename to see
Answer by Just_Jim_98 · Jul 22, 2019 at 12:35 AM
I found the issue, for some reason unity lead me down the path of showing me the issue was on the like i create resources, where actually, it was the parent of that.