Quantcast
Channel: Questions in topic: "namespace"
Viewing all articles
Browse latest Browse all 398

(SOLVED) Script error getting Object to move

$
0
0
So I am trying to make a plate of food move. When I get this script: function Update() { // Move the object to the right relative to the camera 1 unit/second. transform.Translate(Time.deltaTime, 0, 0, Camera.main.transform); } I don't even get chance to attach it to my "plateoffood" because I get this error: The type or namespace name `function' could not be found. Are you missing a using directive or an assembly reference? I try replacing "functon Update ()" with namespace.name.plateoffood Update () However I get this error: Unexpected symbol `namespace' in class, struct, or interface member declaration I tried asking a similar question ealier and I was directed [here][1] by a moderator and my question was denied. Now I have tried their solution and I still don't understand. I am a huge beginner with coding and I want to stop always stealing code from YouTube videos and using the Unity examples and tutorials on coding for myself , though I am struggling. I would appreciate some help. P.S Every time I try and add the second bit of code it changes into numbers and symbols...? [1]: http://docs.unity3d.com/ScriptReference/Transform.Translate.html

Viewing all articles
Browse latest Browse all 398

Trending Articles



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