Search Results for

    Show / Hide Table of Contents

    Namespace OmiyaGames.Web.Security

    Classes

    DebugWebDomainInfo

    Helper debug methods for OmiyaGames.Web.Security namespace. WebDomainVerifier

    StateChangeEventArgs

    Event arguments used to indicate how a state has changed. See OnBeforeStateChange and OnAfterStateChange.

    VerifyEventArgs

    Event arguments used to provide information on verify events. See OnBeforeVerifyWebDomain and OnAfterVerifyWebDomain.

    WebDomainVerifier

    Original code by andyman from Github:
    https://gist.github.com/andyman/e58dea85cce23cccecff

    Extra modifications by jcx from Github:
    https://gist.github.com/jcx/93a3fc93531911add8a8

    For WebGL builds, this script grabs the domain of the website this game is running on, and verifies it against two lists:

    1. The list of strings in DefaultDomainList.
    2. Optionally, if RemoteDomainListUrl isn't an empty string (or null), this script will attempt to download from the specified url, and read it as a . If successful, the globs listed in the will be used to match the domain as well. Remember that if the is encrypted, the OmiyaGames.Web.Security.WebDomainVerifier.domainDecrypter needs to be set in the Unity inspector to help decrypt the content of the list.
    Don't forget to run the VerifyWebDomain() coroutine! When it finished, the CurrentState will be set, indicating whether a match was found or not. Here's an example:
    [SerializeField]
    private WebDomainVerifier domainVerifier;
    
    IEnumerator Start()
    {
        yield return StartCoroutine(domainVerifier.VerifyWebDomain());
        Debug.Log(domainVerifier.CurrentState);
    }

    WebLocationChecker

    Original code by andyman from Github:
    https://gist.github.com/andyman/e58dea85cce23cccecff

    Extra modifications by jcx from Github:
    https://gist.github.com/jcx/93a3fc93531911add8a8

    Add this script to an object in the first scene of your game. For WebGL builds, this script grabs the domain the game is running on, and verifies it against two lists:

    1. The list of strings in DefaultDomainList.
    2. Optionally, if RemoteDomainListUrl isn't an empty string (or null), this script will attempt to download from the specified url, and read it as a . If successful, the globs listed in the will be used to match the domain as well. Remember that if the is encrypted, the OmiyaGames.Web.Security.WebLocationChecker.domainDecrypter needs to be set in the Unity inspector to help decrypt the content of the list.
    Don't forget to run the CheckDomainList() coroutine! When it finished, the CurrentState will be set, indicating whether a match was found or not. Here's an example:
    IEnumerator Start()
    {
        WebLocationChecker checker = GetComponent<WebLocationChecker>();
        yield return StartCoroutine(checker.CheckDomainList());
        Debug.Log(checker.CurrentState);
    }
    If the script is attached to a with already attached, the above example code will run automatically on SceneAwake().

    Enums

    WebDomainVerifier.State

    Indicates progression and result of this script.

    WebLocationChecker.State

    Indicates progression and result of this script.

    Delegates

    WebDomainVerifier.OnStateChange

    WebDomainVerifier.OnVerifyWebDomain

    In This Article
    Back to top Copyright © 2020 Omiya Games