mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
[unity] Fixed Inspector ArgumentOutOfRangeException at searching propertyPath. Closes #2746.
This commit is contained in:
parent
eca4b9e4c1
commit
1121e88422
@ -155,12 +155,14 @@ namespace Spine.Unity.Editor {
|
|||||||
// If this fails as well, try at any base property up the hierarchy
|
// If this fails as well, try at any base property up the hierarchy
|
||||||
if (relativeProperty == null) {
|
if (relativeProperty == null) {
|
||||||
int dotIndex = propertyPath.Length - property.name.Length - 1;
|
int dotIndex = propertyPath.Length - property.name.Length - 1;
|
||||||
while (relativeProperty == null) {
|
if (dotIndex > 0) {
|
||||||
dotIndex = propertyPath.LastIndexOf('.', dotIndex - 1);
|
while (relativeProperty == null) {
|
||||||
if (dotIndex < 0)
|
dotIndex = propertyPath.LastIndexOf('.', dotIndex - 1);
|
||||||
break;
|
if (dotIndex < 0)
|
||||||
newPropertyPath = propertyPath.Remove(dotIndex + 1) + propertyName;
|
break;
|
||||||
relativeProperty = property.serializedObject.FindProperty(newPropertyPath);
|
newPropertyPath = propertyPath.Remove(dotIndex + 1) + propertyName;
|
||||||
|
relativeProperty = property.serializedObject.FindProperty(newPropertyPath);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
"name": "com.esotericsoftware.spine.spine-unity",
|
"name": "com.esotericsoftware.spine.spine-unity",
|
||||||
"displayName": "spine-unity Runtime",
|
"displayName": "spine-unity Runtime",
|
||||||
"description": "This plugin provides the spine-unity runtime core.",
|
"description": "This plugin provides the spine-unity runtime core.",
|
||||||
"version": "4.2.95",
|
"version": "4.2.96",
|
||||||
"unity": "2018.3",
|
"unity": "2018.3",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Esoteric Software",
|
"name": "Esoteric Software",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user