Jump to content

[SOLVED] Is there 'this' in Unigine?


photo

Recommended Posts

To be precise, I'm trying to extend a class from its base class. But I'm not sure how to self construct an extended class in Unigine.

 

Here's an boiled-down example of what I'm trying to do:

 

class ExtendMeshSkinned : ObjectMeshSkinned

{

   private : string nPath;

   public : ExtendMeshSkinned (string nName, vec3 nPos)

   {

        this = ObjectMeshSkinned(nPath + nName);

   }

}

 

Needless to say, it failed miserably. So it gets be wonder if there's such thing as 'this' (c#) in Unigine?

If not, how do i make a class call upon its own reference? And how so I construct an extended class using its base class (below the declaration line, not using the ':' inheritence) ?

 

I read your doc: https://developer.unigine.com/en/docs/1.0/scripting/language/oop#inheritance_c. But I'm doing it a bit differently  and can't figure out how..

 

Many thanks in advance,

Link to comment
×
×
  • Create New...