Jump to content

Access Cigi Plugin functions in Unigine Script


photo

Recommended Posts

I'm having trouble figuring out the way to call the Cigi plugin using Unigine Script.  I've made sure that the plugin is loaded via the configure project and I've made sure that it is included in the .bat.  Cigi works with my project which I've implimented via C++ as per the document tutorial but I can't figure out how to call any of the cigi functions from Unigine Script.  I've tried a couple of different ways of including the header file in the UnigineScript file but I can't seem to have any luck finding the correct file path.

Link to comment

Hi Robert,

There seems to be a bug in CIGI class naming for UnigineScript in the docs, try using the following:

CigiClientInterface  ->  engine.cigi.

...
IEntity  ->  Entity.
ICigiComponentControl  ->  CigiComponentControl.

(removing "I" for all other classes)

	engine.cigi.init(CIGI_VERSION_33, "127.0.0.1", 8889, 8888);;
	if(engine.cigi.isInitialized()){
		log.message("\nCIGIClient Plugin is successfully initialized!\n");
		engine.cigi.showDebug();
	}
	CigiHatHotResponse hat_hot_response = new CigiHatHotResponse();
	hat_hot_response.setHatHotID(1);
	hat_hot_response.setResponseType(1);
	hat_hot_response.setResponseValid(1);
	hat_hot_response.setHeight(300.0f);

Sorry for the inconvenience caused, we'll fix it ASAP! The updated version will be available with the next SDK release.

Hope this helps.

Thank you!

Link to comment
×
×
  • Create New...