Esempio n. 1
0
        /// <inheritdoc />
        public override void Update(float deltaTime)
        {
            base.Update(deltaTime);

            if (_tmpAssetIsDirty)
            {
                _tmpAssetIsDirty = false;

                RefreshTempAsset();
            }

            if (_isWaitingForSurfaceLoad && (_asset.IsLoaded || (CanEditSurfaceOnAssetLoadError && _asset.LastLoadFailed)))
            {
                _isWaitingForSurfaceLoad = false;
                if (!_asset.IsLoaded)
                {
                    Editor.LogWarning("Loading surface for asset that is not loaded: " + OriginalAsset);
                }

                if (LoadSurface())
                {
                    Close();
                    return;
                }

                // Setup
                _undo.Clear();
                _surface.Enabled = true;
                _propertiesEditor.BuildLayout();
                ClearEditedFlag();
                if (_showWholeGraphOnLoad)
                {
                    _showWholeGraphOnLoad = false;
                    _surface.ShowWholeGraph();
                }
            }
            else if (_refreshPropertiesOnLoad && _asset.IsLoaded)
            {
                _refreshPropertiesOnLoad = false;

                _propertiesEditor.BuildLayout();
            }
        }
Esempio n. 2
0
 /// <summary>
 /// Called when surface gets loaded and user can edit it.
 /// </summary>
 protected virtual void OnSurfaceEditingStart()
 {
     _undo.Clear();
     _surface.Enabled = true;
     _propertiesEditor.BuildLayout();
 }