I have built a custom gui menu script and I was thinking about writing it to tell ORK the camera controls should be blocked. Much like a gui menu would work in ORK, I just want to invoke this from a script. Is this possible?
As visual studio reports, there are 2 arguments when calling that function, so change it to:
ORK.Control.SetBlockCamera(1, true);
And to unblock the camera:
ORK.Control.SetBlockCamera(-1, true);
Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found. If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Obviously I'm still learning C# a good bit and I've tried everything I can come up with to get this working. Would it be possible to see a working example? I even tried a simple little script to check if controls are not currently blocked and just block the camera and it didn't work. See below. Pardon my inexperience in the matter, please. :)
using UnityEngine; using System.Collections; using ORKFramework;
public class test : MonoBehaviour {
// Update is called once per frame public void orktestmenu () { if (!ORK.Control.Blocked) ORK.Control.SetBlockCamera(1, true); } }
Since you're blocking the camera controls, you'd need to check if the camera controls are blocked: if(!ORK.Control.CameraBlocked)
ORK.Control.Blocked is for the player control state.
Also - do you call your orktestmenu function somewhere? If not, this will never be executed :)
Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found. If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
There is no argument given that corresponds to the required formal parameter 'notify' of 'ControlHandler.SetBlockCamera(int, bool).
I'm using ORK.Control.SetBlockCamera(1);
ORK.Control.SetBlockCamera(1, true);
And to unblock the camera:
ORK.Control.SetBlockCamera(-1, true);
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
using UnityEngine;
using System.Collections;
using ORKFramework;
public class test : MonoBehaviour {
// Update is called once per frame
public void orktestmenu ()
{
if (!ORK.Control.Blocked)
ORK.Control.SetBlockCamera(1, true);
}
}
if(!ORK.Control.CameraBlocked)
ORK.Control.Blocked is for the player control state.
Also - do you call your orktestmenu function somewhere? If not, this will never be executed :)
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!