Hello, debutant in js and unity, I try to count the number of gameObjetc “zw@lk” my scene to be able to detect when it all died.
I get errors on the JS code
You’ve mixed two programming languages, UnityScript and C#. Besides that, the string in your description does not match the string in the code and the code would be very inefficient as you loop over all gameobjects in the scene and try to find a matching substring in each objects name.
Before suggesting way to improve that, you should start to have a look at some tutorials which cover the basics of programming in JS/US or C#.