Odin serializer & Tri-Inspector #116
Unanswered
SynergyJFernald
asked this question in
Q&A
Replies: 1 comment
-
Tri Inspector is designed to improve rendering of types that are already supported by the unity builtin serializer. Therefore you cannot add custom drawer for You can make your own TypeProcessor to add fields with In version 1.11.0 custom types such as |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Due to licensing restrictions that came with Odin Inspector 3.0 I've been looking around for alternatives and Tri-Inspector meets most of the requirements I have for attribute usage. I was planning to add some custom Tri-Attributes to the package to bring it more in parity with Odin however I'm having a bit of a problem trying to figure out how to access Odin serialized types (Dictionaries, properties, interfaces and similar).
I've been successful in getting properties to display in the inspector by doing the following:
`using Sirenix.OdinSerializer;
using System.Collections.Generic;
using TriInspector;
using UnityEngine;
[DrawWithTriInspector]
public class Test : SerializedMonoBehaviour
{
[OdinSerialize, ShowInInspector]
public Vector3 TestProperty { get; set; } = Vector3.zero;
}`
However the ShowInInspector attribute doesn't have a property drawer and so customizing the display for something like a Dictionary isn't straight forward. And if I create my own SeralizedDictionary attribute/drawer for Tri-Inspector OnGUI in the drawer doesn't appear to be getting hit if it's an item that Odin is serializing. I was hoping you might be able to offer some guidance on how I might be able to get access to the Odin serialized data in a TriAttributeDrawer. Is it just a matter of creating a new property resolver? If so would you be able to provide an example?
Beta Was this translation helpful? Give feedback.
All reactions