Forge/Editor/ForgeEditorUtils.cs
/// <summary>
/// Attempts to retrieve an IQueryableEntity from the currently selected game object.
/// Returns null if there is no selected IQueryableEntity.
/// </summary>
Attempts to retrieve an IQueryableEntity from the currently selected game object.
Returns null if there is no selected IQueryableEntity.
Attempts to retrieve an IQueryableEntity from the currently selected game object . Returns null if there is no selected IQueryableEntity .
public static IQueryableEntity TryGetQueryableEntity() {
            GameObject selected = Selection.activeGameObject;
            if (selected == null) {
                return null;
            }
            BaseContainer container = selected.GetComponent<BaseContainer>();
            if (container == null) {
                return null;
            }
            return container.QueryableEntity;
        }
public static IQueryableEntity TryGetQueryableEntity ( ) { GameObject selected = Selection . activeGameObject ; if ( selected == null ) { return null ; } BaseContainer container = selected . GetComponent < BaseContainer > ( ) ; if ( container == null ) { return null ; } return container . QueryableEntity ; }
Attempts to retrieve an IQueryableEntity from the currently selected game object.
Attempts to retrieve an IQueryableEntity from the currently selected game object .