private static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths)
 {
     if (NoesisSettings.IsNoesisEnabled())
     {
         ImportAssets(importedAssets.Concat(movedAssets).ToArray(), null);
     }
 }
    public void OnEnable()
    {
        if (_commands == null)
        {
            _commands = new UnityEngine.Rendering.CommandBuffer();
        }

        if (NoesisSettings.IsNoesisEnabled())
        {
            RegisterFont();
        }
    }
Beispiel #3
0
    private static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths)
    {
        if (NoesisSettings.IsNoesisEnabled())
        {
            EditorApplication.CallbackFunction d = null;

            // Delay the import process to have all texture assets ready
            d = () =>
            {
                EditorApplication.update -= d;

                string[] assets = importedAssets.Concat(movedAssets).ToArray();
                NoesisPostprocessor.ImportAssets(assets, (progress, asset) => EditorUtility.DisplayProgressBar("Import XAMLs", asset, progress));
                EditorUtility.ClearProgressBar();
            };

            EditorApplication.update += d;
        }
    }
    public void OnDisable()
    {
        if (_view != null)
        {
            _commands.Clear();
            NoesisRenderer.UnregisterView(_view, _commands);
            Graphics.ExecuteCommandBuffer(_commands);
        }

        if (_viewIcon != null)
        {
            _commands.Clear();
            NoesisRenderer.UnregisterView(_viewIcon, _commands);
            Graphics.ExecuteCommandBuffer(_commands);
        }

        if (NoesisSettings.IsNoesisEnabled())
        {
            UnregisterFont();
        }
    }
Beispiel #5
0
    private bool CanRender()
    {
        NoesisXaml xaml = (NoesisXaml)target;

        return(NoesisSettings.IsNoesisEnabled() && xaml != null && xaml.CanLoad() && NoesisSettings.Get().previewEnabled);
    }
 private bool CanRender()
 {
     return(NoesisSettings.IsNoesisEnabled() && NoesisSettings.Get().previewEnabled&& _faces.Count > 0);
 }
Beispiel #7
0
 public bool CanLoad()
 {
     return(NoesisSettings.IsNoesisEnabled() && !string.IsNullOrEmpty(source) && content != null);
 }