/// <summary> /// Sets the provided content as the global active object. /// </summary> /// <param name="content">The content to display.</param> /// <param name="parameters"></param> /// <exception cref="ArgumentNullException">The content cannot be <see langword="null"/>.</exception> /// <typeparam name="T">The typeof the content. Must be default constructable.</typeparam> public static void ShowInInspector <T>(T content, InspectorContentParameters parameters) where T : ContentProvider, new() { if (EqualityComparer <T> .Default.Equals(content, default)) { throw new ArgumentNullException(nameof(content)); } InspectorContent.Show(content, parameters); }
/// <summary> /// Sets the provided <see cref="UnityEngine.Object"/> as the global active object. /// </summary> /// <param name="content">The <see cref="UnityEngine.Object"/> to display.</param> /// <exception cref="ArgumentNullException">The content cannot be <see langword="null"/>.</exception> public static void ShowInInspector(UnityEngine.Object content) { if (null == content || !content) { throw new ArgumentNullException(nameof(content)); } InspectorContent.Show(new UnityObjectContentProvider { Object = content }, new InspectorContentParameters()); }