48 lines
1.4 KiB
C#
48 lines
1.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using Sirenix.OdinInspector;
|
|
using UnityEngine;
|
|
using UnityEngine.Serialization;
|
|
|
|
namespace Cielonos.MainGame.Inventory
|
|
{
|
|
[CreateAssetMenu(fileName = "ViewObjectData", menuName = "Cielonos/Items/ViewObjectData")]
|
|
public partial class ViewObjectData : SerializedScriptableObject
|
|
{
|
|
[ListDrawerSettings(ShowFoldout = true)]
|
|
public List<ViewObjectDataUnit> viewObjectUnits = new List<ViewObjectDataUnit>();
|
|
}
|
|
|
|
public partial class ViewObjectData
|
|
{
|
|
public enum AttachBodyPartType
|
|
{
|
|
RightHand,
|
|
LeftHand,
|
|
Head,
|
|
FlexibleCenterPoint,
|
|
Back,
|
|
Hips,
|
|
RightFoot,
|
|
LeftFoot,
|
|
}
|
|
|
|
[Serializable]
|
|
public class ViewObjectDataUnit
|
|
{
|
|
public string objectName;
|
|
public GameObject objectPrefab;
|
|
public bool isCustomAttachPoint;
|
|
[HideIf("isCustomAttachPoint")]
|
|
public AttachBodyPartType normalAttachBodyPart;
|
|
[ShowIf("isCustomAttachPoint")]
|
|
public string customAttachPartName;
|
|
|
|
public bool applyOffset;
|
|
[ShowIf("applyOffset")]
|
|
public Vector3 positionOffset;
|
|
[ShowIf("applyOffset")]
|
|
public Vector3 rotationOffset;
|
|
}
|
|
}
|
|
} |