08-12-2020, 11:21 AM
(This post was last modified: 08-12-2020, 11:27 AM by josemendez.)
(08-12-2020, 10:46 AM)FZMv587 Wrote: Hi buddy
Thank for you answer me and do not think too much about "totally script", it's just script, i am not good at english, sometimes i have wrong express.
I read the pages you just gave me ,and i try to test those codes , but i meet problem in the beginning.
I update two images, one is my code and another is the error in unity.
I am just copied from " http://obi.virtualmethodstudio.com/tutor...ctors.html ".
Could you help me figure out what is the problem?
Thank you
Hi,
It's clear you're a beginner with programming. In this case, I strongly suggest to learn some basic C# before attempting to use Obi, as it is aimed at advanced users. Basic programming skills are taken for granted.
The script in your screenshot does not make any sense. The compiler is telling you it did not expect to find a function call directly inside the class, outside of a function definition. That's what the "invalid token '(' in class declaration" error means. The code must be placed inside Awake(), Update(), or any other member function you define, depending on when/how you want to execute that code.