Hey,
I'm calling an external method following https://docs.unity3d.com/Manual/NativePlugins.html every frame on Update (). The problem is, the native position update is not in Sync with the underlying Unity rendering. It looks like the hotspots are stuttering because they are one or more frames behind. Is that expected? Is there any way to call it synced not asynced?
[DllImport ("__Internal")]
private static extern void nativeViewUpdateHotspot(string name, float x, float y);
-
extern "C" {
void nativeViewUpdateHotspot(const char* name, float x, float y, float percentage, float direction, float distance) {
…
[hotspotsViewController updateHotspot:[NSString stringWithUTF8String:name]
x:CGFloat(x)
y:CGFloat(y)
];
}
}
↧