Esempio n. 1
0
    public override void OnInspectorGUI()
    {
        base.OnInspectorGUI();
        CharacterClippingProtector HideOcclude = (CharacterClippingProtector)target;

        if (GUILayout.Button("Reset Meshes & Cache"))
        {
            HideOcclude.ResetMeshesToOriginal();
            HideOcclude.ResetCachedResults();
        }
        if (GUILayout.Button("Check"))
        {
            HideOcclude.StartEditorCoroutine();
        }
    }
Esempio n. 2
0
    public override void OnInspectorGUI()
    {
        base.OnInspectorGUI();
        CharacterClippingProtector ClipProtector = (CharacterClippingProtector)target;

        if (GUILayout.Button("Reset Meshes & Cache"))
        {
            ClipProtector.ResetMeshesToOriginal();
            ClipProtector.ResetCachedResults();
        }
        if (GUILayout.Button("Save Last Result In Resources"))
        {
            CharacterClippingScriptableResult Res = CharacterClippingScriptableResult.SaveLastResultToCache(ClipProtector);
            //Notify user of cache size & new item size
            NotifyUserCacheSizeNewSize(Res);
        }
        if (GUILayout.Button("Run Clipping Protector"))
        {
            ClipProtector.StartEditorCoroutine();
        }
    }