mirror of
https://github.com/DCFApixels/DragonECS-Unity.git
synced 2025-09-18 01:54:35 +08:00
Merge branch 'dev'
This commit is contained in:
commit
1ee1609517
@ -8,7 +8,7 @@
|
|||||||
"displayName": "DragonECS-Unity",
|
"displayName": "DragonECS-Unity",
|
||||||
"description": "Integration with Unity for DragonECS",
|
"description": "Integration with Unity for DragonECS",
|
||||||
"unity": "2021.2",
|
"unity": "2021.2",
|
||||||
"version": "0.3.19",
|
"version": "0.3.20",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/DCFApixels/DragonECS-Unity.git"
|
"url": "https://github.com/DCFApixels/DragonECS-Unity.git"
|
||||||
|
@ -82,6 +82,10 @@ namespace DCFApixels.DragonECS.Unity.Editors
|
|||||||
|
|
||||||
public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
|
public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
|
||||||
{
|
{
|
||||||
|
if(property.propertyType == SerializedPropertyType.ManagedReference == false)
|
||||||
|
{
|
||||||
|
return EditorGUI.GetPropertyHeight(property, label);
|
||||||
|
}
|
||||||
IComponentTemplate template = property.managedReferenceValue as IComponentTemplate;
|
IComponentTemplate template = property.managedReferenceValue as IComponentTemplate;
|
||||||
if (template == null || property.managedReferenceValue == null)
|
if (template == null || property.managedReferenceValue == null)
|
||||||
{
|
{
|
||||||
@ -114,6 +118,12 @@ namespace DCFApixels.DragonECS.Unity.Editors
|
|||||||
|
|
||||||
public override void OnGUI(Rect position, SerializedProperty componentRefProp, GUIContent label)
|
public override void OnGUI(Rect position, SerializedProperty componentRefProp, GUIContent label)
|
||||||
{
|
{
|
||||||
|
if (componentRefProp.propertyType == SerializedPropertyType.ManagedReference == false)
|
||||||
|
{
|
||||||
|
EditorGUI.PropertyField(position, componentRefProp, label, true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Init();
|
Init();
|
||||||
var counter = componentRefProp.Copy();
|
var counter = componentRefProp.Copy();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user