Avoid exposing a bunch of internal APIs

This commit is contained in:
bd_ 2022-11-27 13:51:39 -08:00
parent 0a8272f017
commit ff313f33a9
16 changed files with 23 additions and 20 deletions

View File

@ -33,7 +33,7 @@ using Object = UnityEngine.Object;
namespace nadena.dev.modular_avatar.core.editor
{
public class AnimatorCombiner
internal class AnimatorCombiner
{
private readonly AnimatorController _combined;

View File

@ -23,15 +23,11 @@
*/
using UnityEditor;
using UnityEngine;
using UnityEngine.SceneManagement;
using VRC.SDK3.Avatars.Components;
using VRC.SDKBase.Editor.BuildPipeline;
namespace nadena.dev.modular_avatar.core.editor
{
[InitializeOnLoad]
public static class ApplyOnPlay
internal static class ApplyOnPlay
{
private const string MENU_NAME = "Tools/Modular Avatar/Apply on Play";

View File

@ -39,6 +39,9 @@ namespace nadena.dev.modular_avatar.core.editor
{
public delegate void AvatarProcessorCallback(GameObject obj);
/// <summary>
/// This API is NOT stable. Do not use it yet.
/// </summary>
public static event AvatarProcessorCallback AfterProcessing;
static AvatarProcessor()

View File

@ -5,7 +5,7 @@ using VRC.SDK3.Avatars.Components;
namespace nadena.dev.modular_avatar.core.editor
{
[CustomPropertyDrawer(typeof(AvatarObjectReference))]
public class AvatarObjectReferenceDrawer : PropertyDrawer
internal class AvatarObjectReferenceDrawer : PropertyDrawer
{
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{

View File

@ -3,7 +3,7 @@ using UnityEditor;
namespace nadena.dev.modular_avatar.core.editor
{
public class ZeroIndentScope : IDisposable
internal class ZeroIndentScope : IDisposable
{
private int oldIndentLevel;

View File

@ -9,7 +9,7 @@ using UnityEngine;
namespace nadena.dev.modular_avatar.core.editor
{
public static class Localization
internal static class Localization
{
private const string localizationPathGuid = "488c994003974b3ab2796371cf627bca";
private static string localizationPathRoot = AssetDatabase.GUIDToAssetPath(localizationPathGuid);

View File

@ -9,7 +9,7 @@ using Object = UnityEngine.Object;
namespace nadena.dev.modular_avatar.core.editor
{
public class MenuInstallHook
internal class MenuInstallHook
{
private static Texture2D _moreIcon = AssetDatabase.LoadAssetAtPath<Texture2D>(
"Packages/nadena.dev.modular-avatar/Runtime/Icons/Icon_More_A.png"

View File

@ -33,7 +33,7 @@ using Object = UnityEngine.Object;
namespace nadena.dev.modular_avatar.core.editor
{
public class MergeArmatureHook
internal class MergeArmatureHook
{
private Dictionary<Transform, Transform> BoneRemappings = new Dictionary<Transform, Transform>();
private HashSet<GameObject> ToDelete = new HashSet<GameObject>();

View File

@ -127,7 +127,7 @@ namespace nadena.dev.modular_avatar.core.editor
* This class processes a given mesh, adjusting the bind poses for any bones that are to be merged to instead match
* the bind pose of the original avatar's bone.
*/
public class MeshRetargeter
internal class MeshRetargeter
{
private readonly SkinnedMeshRenderer renderer;
private Mesh src, dst;

View File

@ -27,7 +27,7 @@ using UnityEngine;
namespace nadena.dev.modular_avatar.core.editor
{
public static class ModularAvatarSettings
internal static class ModularAvatarSettings
{
private const string PREFKEY_APPLY_ON_PLAY = "nadena.dev.modular-avatar.applyOnPlay";
#if UNITY_EDITOR

View File

@ -11,7 +11,7 @@ using VRC.SDK3.Dynamics.PhysBone.Components;
namespace nadena.dev.modular_avatar.core.editor
{
public struct DetectedParameter
internal struct DetectedParameter
{
public string OriginalName;
public bool IsPrefix;
@ -22,7 +22,7 @@ namespace nadena.dev.modular_avatar.core.editor
public string MapKey => IsPrefix ? OriginalName + "*" : OriginalName;
}
public static class ParameterPolicy
internal static class ParameterPolicy
{
/// <summary>
/// Parameters predefined by the VRChat SDK which should not be offered as remappable.

View File

@ -28,11 +28,11 @@ using VRC.SDKBase.Editor.BuildPipeline;
namespace nadena.dev.modular_avatar.core.editor
{
public static class PathMappings
internal static class PathMappings
{
private static List<(string, MappingEntry)> Mappings = new List<(string, MappingEntry)>();
public struct MappingEntry
internal struct MappingEntry
{
public string path;
public string transformPath;

View File

@ -13,7 +13,7 @@ using Object = UnityEngine.Object;
namespace nadena.dev.modular_avatar.core.editor
{
public class RenameParametersHook
internal class RenameParametersHook
{
private const string DEFAULT_EXP_PARAMS_ASSET_GUID = "03a6d797deb62f0429471c4e17ea99a7";

View File

@ -43,7 +43,7 @@ namespace nadena.dev.modular_avatar.core.editor
}
[InitializeOnLoad]
public static class Util
internal static class Util
{
private const string generatedAssetsSubdirectory = "999_Modular_Avatar_Generated";
private const string generatedAssetsPath = "Assets/" + generatedAssetsSubdirectory;

View File

@ -27,7 +27,7 @@ using JetBrains.Annotations;
namespace nadena.dev.modular_avatar.core.editor
{
[UsedImplicitly]
public static class Version
internal static class Version
{
[UsedImplicitly] public const string VERSION = "0.0.1";
}

View File

@ -33,6 +33,10 @@ using System.Reflection;
namespace nadena.dev.modular_avatar.core
{
/**
* This class is public for the benefit of the Editor namespace classes, but is not a stable API and may change
* on patch releases.
*/
public static class RuntimeUtil
{
// Initialized in Util