mirror of
https://github.com/codewriter-packages/Tri-Inspector.git
synced 2025-01-22 00:08:51 -05:00
Drop support of Tri-drawn properties in Odin editors
This commit is contained in:
parent
5dc71785af
commit
4df61db1e1
@ -3,7 +3,7 @@ using Sirenix.OdinInspector.Editor;
|
||||
using Sirenix.Utilities.Editor;
|
||||
using UnityEngine;
|
||||
|
||||
#if !TRIINSPECTOR_DISABLE_ODIN_FIELDS_INJECTOR
|
||||
#if TRIINSPECTOR_ODIN_FIELDS_INJECTOR
|
||||
|
||||
namespace TriInspector.Editor.Integrations.Odin
|
||||
{
|
||||
@ -43,8 +43,13 @@ namespace TriInspector.Editor.Integrations.Odin
|
||||
|
||||
for (var parent = property.Parent; parent != null; parent = parent.Parent)
|
||||
{
|
||||
var parentType = parent.ValueEntry.TypeOfValue;
|
||||
if (TriOdinUtility.IsDrawnByTri(parentType))
|
||||
var valueEntry = parent.ValueEntry;
|
||||
if (valueEntry == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (TriOdinUtility.IsDrawnByTri(valueEntry.TypeOfValue))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -3,7 +3,7 @@ using Sirenix.OdinInspector.Editor;
|
||||
using Sirenix.OdinInspector.Editor.Validation;
|
||||
using TriInspector.Editor.Integrations.Odin;
|
||||
|
||||
#if !TRIINSPECTOR_DISABLE_ODIN_FIELDS_INJECTOR
|
||||
#if TRIINSPECTOR_ODIN_FIELDS_INJECTOR
|
||||
|
||||
[assembly: RegisterValidator(typeof(OdinFieldValidator<>))]
|
||||
|
||||
@ -43,8 +43,13 @@ namespace TriInspector.Editor.Integrations.Odin
|
||||
|
||||
for (var parent = property.Parent; parent != null; parent = parent.Parent)
|
||||
{
|
||||
var parentType = parent.Info.TypeOfValue;
|
||||
if (TriOdinUtility.IsDrawnByTri(parentType))
|
||||
var valueEntry = parent.ValueEntry;
|
||||
if (valueEntry == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (TriOdinUtility.IsDrawnByTri(valueEntry.TypeOfValue))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user