Documentation

iConsent Keychain

iConsent SDKs

Java

API doc


Example

Ruby

Coming soon


iConsent Dapp


API / Scripting / Scripting Overview / Namespaces

Namespaces

Note that the context argument is not needed in the call; the Namespace tag creates a locally-scoped callable which takes care of it. The return '' is so that the def does not dump a None into the output stream – the return value of any def is rendered after the def completes, in addition to whatever was passed to Context.write() within its body.

If your def is to be called in an “embedded content” context, that is as described in Calling a Def with Embedded Content and/or Other Defs, you should use the supports_caller() decorator, which will ensure that Mako will ensure the correct “caller” variable is available when your def is called, supporting embedded content:

namespace Enemy {
  public class Controller1 : MonoBehaviour {
    ...
  }

  public class Controller2 : MonoBehaviour {
    ...
  }
}

Note that the context argument is not needed in the call; the Namespace tag creates a locally-scoped callable which takes care of it. The return '' is so that the def does not dump a None into the output stream – the return value of any def is rendered after the def completes, in addition to whatever was passed to Context.write() within its body.

If your def is to be called in an “embedded content” context, that is as described in Calling a Def with Embedded Content and/or Other Defs, you should use the supports_caller() decorator, which will ensure that Mako will ensure the correct “caller” variable is available when your def is called, supporting embedded content: