Пример #1
0
    public void Request(Action <string> callback)
    {
        this.callback = callback;
#if UNITY_EDITOR
        this.callback(null);
#elif UNITY_2018_1_OR_NEWER && !ACTK_UWP_NO_IL2CPP
        CodeHashGenerator.Generate();
#endif
    }
Пример #2
0
        public void StartGeneration()
        {
            // This is a good practice to avoid new requests while generator is busy with previous requests.
            if (CodeHashGenerator.Instance.IsBusy)
            {
                return;
            }

            // Just subscribe to generation event and start generation.
            // Generation runs in separate thread avoiding cpu spikes in main thread.
            // It generates hash only once and cache it for any new requests since compiled code does not change in runtime.
            CodeHashGenerator.HashGenerated += OnHashGenerated;
            CodeHashGenerator.Generate();
        }
Пример #3
0
 private void OnCheckHashClick()
 {
     status = "Checking...";
     CodeHashGenerator.Generate();
 }