Unity SDK development choices

Hi there,

Recently I got an NReal dev kit device and tried working on it.

First of all NReal Unity SDK 1.8.0. isn’t working with apple silicon unity versions. It works on Apple Silicon Mac with an intel version unity using release using rosetta. I tried a number of different builds until trying an intel unity version nothing worked.

Secondly and more importantly I am dumbfounded by design choices for unity SDK. Everything uses expensive update loops. For those who don’t know, the Unity update loop works as an event in unity and works in every frame. So in general if your game/app works at 60 fps, the update loop works 60 times per second. NReal demo scenes and scripts used in prefabs have codes that check if the controller is triggered or not.

Normally if the controller triggered it would fire event that calls a function you set. NReal SDK checks every second for at least 60 times if the controller is triggered and if not quits the update loop. This is quite expensive in unity scope. This is just an example and not a single case. There are quite expensive operations that are done extensively and repeatedly. While the NReal is a good product, this would consume the device battery quite faster.

Please point out if my assumptions and deductions are wrong.

There are several callbacks for controller as descripted on this page:


//Add button down listeners for right controller's trigger button

NRInput.AddDownListener(ControllerHandEnum.Right, ControllerButton.TRIGGER, () => { Debug.Log("do sth"); });

//Add pressing listeners for right controller's trigger button

NRInput.AddPressingListener(ControllerHandEnum.Right, ControllerButton.TRIGGER, () => { Debug.Log("do sth"); });

//Add button up listeners for right controller's trigger button

NRInput.AddUpListener(ControllerHandEnum.Right, ControllerButton.TRIGGER, () => { Debug.Log("do sth"); })