public override string GetLabelText() { var target = CommandItem.CommandProperty.GetProperty().FindPropertyRelative("target"); var valueToSet = CommandItem.CommandProperty.GetProperty().FindPropertyRelative("value"); if (target.hasChildren) { var iter = target.Copy(); iter.Next(true); if (iter.depth > target.depth && target.FindPropertyRelative("key") != null) { //空っぽじゃない var targetKey = target.FindPropertyRelative("key").stringValue; var valueKey = valueToSet.FindPropertyRelative("key").stringValue; var targetDesc = VariableReferencePropertyDrawer.GetDescription(target); var valueDesc = VariableReferencePropertyDrawer.GetDescription(valueToSet); /* * var targetTypeProp = target.FindPropertyRelative("storeType"); * var valueTypeProp = valueToSet.FindPropertyRelative("storeType"); * var targetType = targetTypeProp.enumDisplayNames[targetTypeProp.enumValueIndex]; * var valueType = valueTypeProp.enumDisplayNames[valueTypeProp.enumValueIndex]; * * string targetText = (targetType == "Constant" ? "(定数)" : $"<{targetKey}>({(targetType == "Event" ? "イベント変数" : "一時変数")})"); * string valueText = (valueType == "Constant" ? "(定数)" : $"<{valueKey}>({(valueType == "Event" ? "イベント変数" : "一時変数")})"); */ return($"変数代入: {targetDesc} = {valueDesc}"); } } return("変数代入: (未設定)"); }
public override string GetLabelText() { var prop = CommandItem.CommandProperty.GetProperty(); var vProp = prop.FindPropertyRelative("count"); var v = VariableReferencePropertyDrawer.GetDescription(vProp); return($"回数繰り返し (変数) : {v}"); }
public static string GetDescription(SerializedProperty property) { var leftProp = property.FindPropertyRelative("left"); var rightProp = property.FindPropertyRelative("right"); var operatorProp = property.FindPropertyRelative("conditionOperator"); var symbol = GetOperatorSymbol(operatorProp); var left = VariableReferencePropertyDrawer.GetDescription(leftProp); var right = VariableReferencePropertyDrawer.GetDescription(rightProp); return($"{left} {symbol} {right}"); }
public override string GetLabelText() { var target = CommandItem.CommandProperty.GetProperty().FindPropertyRelative("target"); if (target.FindPropertyRelative("key") != null) { //空っぽじゃない var s = VariableReferencePropertyDrawer.GetDescription(target); return($"{s}の内容をログ出力"); } else { return("変数ログ出力"); } }
public override string GetLabelText() { string desc = VariableReferencePropertyDrawer.GetDescription(CommandItem.CommandProperty.GetProperty().FindPropertyRelative("duration")); return($"{desc} 秒ウェイト"); }