1using System.Collections;2using System.Collections.Generic;3using UnityEngine;456[System.Serializable]7public class CardEffect
8{91011 public enumEffectKind12{13 DAMAGE,14 OTHER
15}1617[System.Serializable]18 public class Result
19{20 public EffectKind effectKind;2122 public int damageValue;2324 public TargetSearch targetSearch;25}2627[SerializeField,Header("効果")]28 Result result;29}
C#
1using System.Collections;2using UnityEngine;3using UnityEditor;4using System.Collections.Generic;56[CustomEditor(typeof(CardEffect.Result))]7public class CardEffectEditor : Editor
8{9 public override voidOnInspectorGUI()10{11//エラー "UnityEngine.Object"を"CardEffect.Result"に変換できません12 CardEffect.Result result = target as CardEffect.Result;13}14}
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。