The question is answered, right answer was accepted
Why i am taking this error can anyone explain?
Hi everyone firstly sorry for my English...
i can play scene with this errors but i don't know it will be problem for me soon ?
Assets/Scripts/UnderWater.js(70,22): BCW0012: WARNING: 'UnityEngine.GameObject.active' is obsolete. GameObject.active is obsolete. Use GameObject.SetActive(), GameObject.activeSelf or GameObject.activeInHierarchy.
Answer by JaredThomson · Jan 14, 2016 at 03:01 PM
Hello dandelo99.
Your code in UnderWater.js
on line 70 is using something like gameObject.active = true;
. Instead you can use something like gameObject.SetActive(true);
. The first way is old (what obsolete means).
It's a simple warning you can solve, but in the future please post the code you're getting an error with.
my code was actually gameObject.active = true; thank you very much i ll use gameObject.SetActive(true); i hope nothing will change in game.