Quantcast
Channel: Latest Questions on Unity Answers
Viewing all articles
Browse latest Browse all 171066

Declaring a new Object (JS)

$
0
0
the following code does not work var myobj =new Object(); myobj.strength = 15; i get a long error, starting with "MissingFieldException: System.Object.strength". I am fairly proficient in my javascript knowledge. this is not the first time something i have typed into the unity editor that would work perfectly in plain javascript has not worked. Often times things have slightly different names, like Math in JS and Mathf in Unityscript. Am i off my rocker? did i forget what i know about objects? or is this just not mean what i think it means. any help to point me in the right direction to preforming this correctly is greatly appreciated. Have a Quishtay™ Day!

Viewing all articles
Browse latest Browse all 171066

Latest Images

Trending Articles



Latest Images

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