Hello,

I have created a simple access handler as following (based on your sample code):



/**
* MyGame namespace
*/
namespace MyGame {

// Defines the name and help text of this access handler.
[ORKEditorSettingInfo("Custom", "Custom Access Handler for MyGame game.", "")]

// The access handler holds the sub-handlers with their overridable functions.
public class CustomAccessHandler : AccessHandler {

// The constructor needs to create the instances of the sub-handlers for actions, combatants, groups and inventory.
public CustomAccessHandler() {
Debug.Log("Custom handler active");

//this.actionAccess = new CustomActionAccessHandler();
this.combatantAccess = new CustomCombatantAccessHandler();
//this.groupAccess = new CustomGroupAccessHandler();
//this.inventoryAccess = new CustomInventoryAccessHandler();
}
}
}



When I set the access handler in the ORK Game settings to "Custom", I see immediately the "Custom handler active" output in the console. When I start the game after saving the settings, I do not see this output. And when I enter the ORK settings again after leaving Playmode, the setting did jump back to "Default". Pressing the reload button also turns the access handler setting back to "default". Am I doing somthing wrong?

Best regards, D.
  • edited August 2020
    I've just updated the access handler how-to, since recent ORK updates added a new sub-handler (battle access handler).

    You need to set/create all the sub-handlers in your custom handler's constructor, otherwise you'll get errors when ORK tries to access the handlers that where not created.

    Also, be sure to save in the ORK editor after changing the access handler. I just did a quick test with the custom handler available in the how-to and that worked fine.
    Post edited by gamingislove on
    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!
  • Thanks a lot, this was the problem! I did not create all handlers.
Sign In or Register to comment.