2022-10-05 08:34:04 +08:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
2022-11-11 12:39:58 +08:00
|
|
|
|
namespace nadena.dev.modular_avatar.core
|
2022-10-05 08:34:04 +08:00
|
|
|
|
{
|
|
|
|
|
[Serializable]
|
|
|
|
|
public struct ParameterConfig
|
|
|
|
|
{
|
|
|
|
|
public string nameOrPrefix;
|
|
|
|
|
public string remapTo;
|
|
|
|
|
public bool internalParameter, isPrefix;
|
2022-10-16 09:43:21 +08:00
|
|
|
|
public ParameterSyncType syncType;
|
2023-04-15 16:06:35 +08:00
|
|
|
|
public bool localOnly;
|
2022-10-16 09:43:21 +08:00
|
|
|
|
public float defaultValue;
|
|
|
|
|
public bool saved;
|
|
|
|
|
}
|
|
|
|
|
|
2023-04-15 16:06:35 +08:00
|
|
|
|
/**
|
|
|
|
|
* This enum is a bit poorly named, having been introduced before local-only parameters were a thing. In actuality,
|
|
|
|
|
* this is the parameter type - NotSynced indicates the parameter should not be registered in Expression Parameters.
|
|
|
|
|
*/
|
2022-10-16 09:43:21 +08:00
|
|
|
|
public enum ParameterSyncType
|
|
|
|
|
{
|
|
|
|
|
NotSynced,
|
|
|
|
|
Int,
|
|
|
|
|
Float,
|
|
|
|
|
Bool,
|
2022-10-05 08:34:04 +08:00
|
|
|
|
}
|
|
|
|
|
|
2022-10-16 07:35:16 +08:00
|
|
|
|
[DisallowMultipleComponent]
|
2022-11-10 09:49:00 +08:00
|
|
|
|
[AddComponentMenu("Modular Avatar/MA Parameters")]
|
2022-10-05 08:34:04 +08:00
|
|
|
|
public class ModularAvatarParameters : AvatarTagComponent
|
|
|
|
|
{
|
|
|
|
|
public List<ParameterConfig> parameters = new List<ParameterConfig>();
|
|
|
|
|
}
|
|
|
|
|
}
|