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:
szczuras4
2024-12-28 00:03:40 +01:00
parent c596494d77
commit e75b093317
553 changed files with 48087 additions and 68332 deletions

View File

@@ -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();