Home > other >  Unityscript how referenced to a class member function of the definition of the object instance?
Unityscript how referenced to a class member function of the definition of the object instance?

Time:09-23

Such as A class A, then use class defines an object b
Var b: A=new A ();
And then in A want to use the definition of b;
Class A
{
Var I: int.
The function ()
{
If (I=b.i);
}
But I will complain this orthography, said there is no b
How to write the correct grammar?
,,

CodePudding user response:

this.i

CodePudding user response:

This. I try, the unity inside as far as possible not to use inherits the MonoBehaviour class constructors, there will be all you want to unexpected problems
  • Related