poprawki materialy unity 6, pajaki, podmiana katalogu FSM w AIControlerze, zmiana w Spider 2.0 Behaviours , skopane zycie bylo, ladowalo pajaka z zyciem 2.
This commit is contained in:
@@ -10,8 +10,7 @@ namespace Invector.vCharacterController.AI
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(vAITarget),true)]
|
||||
public class vAITargetDrawer : PropertyDrawer
|
||||
{
|
||||
|
||||
{
|
||||
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
|
||||
{
|
||||
|
||||
@@ -40,11 +39,13 @@ namespace Invector.vCharacterController.AI
|
||||
rect.width = EditorGUIUtility.singleLineHeight;
|
||||
property.isExpanded = EditorGUI.Foldout(rect, property.isExpanded, "");
|
||||
rect.width = oldWidth;
|
||||
}
|
||||
EditorGUI.PropertyField(rect, property.FindPropertyRelative("_transform"), !property.propertyPath.Contains("Array")?GUIContent.none:label);
|
||||
|
||||
}
|
||||
SerializedProperty transformProp = property.FindPropertyRelative("_transform");
|
||||
GUI.color =transformProp.objectReferenceValue!=null? ( property.FindPropertyRelative("isFixedTarget").boolValue ? Color.red : Color.green):Color.grey;
|
||||
EditorGUI.PropertyField(rect, transformProp, !property.propertyPath.Contains("Array")?GUIContent.none:label);
|
||||
GUI.color = Color.white;
|
||||
rect.y += EditorGUIUtility.singleLineHeight;
|
||||
|
||||
GUI.enabled = true;
|
||||
if (property.hasVisibleChildren && property.isExpanded)
|
||||
{
|
||||
var childEnum = property.GetEnumerator();
|
||||
@@ -52,16 +53,22 @@ namespace Invector.vCharacterController.AI
|
||||
while (childEnum.MoveNext())
|
||||
{
|
||||
var current = childEnum.Current as SerializedProperty;
|
||||
|
||||
if (property.name!=("_transform"))
|
||||
{
|
||||
|
||||
rect.height = EditorGUI.GetPropertyHeight(current);
|
||||
EditorGUI.PropertyField(rect, current);
|
||||
if (property.name == "_tag")
|
||||
{
|
||||
EditorGUI.LabelField(rect, "Tag", property.stringValue,EditorStyles.linkLabel);
|
||||
}
|
||||
else EditorGUI.PropertyField(rect, current);
|
||||
rect.y += EditorGUI.GetPropertyHeight(current);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (GUI.changed) property.serializedObject.ApplyModifiedProperties();
|
||||
EditorGUI.EndProperty();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user