Comments (8)
Whoa 😲. I never thought of possibility to extend existing custom drawers this way! Maybe I'll contact Bryon to embed this one in MyBox. Thanks for bringing this up 👍
Quite a few of interesting ideas he's got there btw
from mybox.
Yep, actually there is no way to draw custom property drawer inside of property drawer. So any property with fancy inspector appearance will be drawn as a plain data :(
Like with arrays, it's just the way unity works.
from mybox.
...buuut I found this thread on how to hack the engine to make it done, so maybe there is some hope :)
// I'll check it a bit later
https://forum.unity.com/threads/drawing-default-property-drawer-in-a-custom-property-drawer.197268/
from mybox.
Works in my case. Is it already fixed?
from mybox.
Are you sure you checked on UnityEvent?
Tested it now and it looks like this:
public bool A;
[ConditionalField("A")] public UnityEvent B;
ConditionalField should handle most of the types now, but still struggles with such types like UnityEvent, which have Custom Drawer and base class
from mybox.
Yes it's working:
I use Untiy 2019.3.0f3 maybe that's the reason why?
from mybox.
Ahh.. sorry found out why. I use a custom property drawer for UnityEvents:
https://gist.github.com/ByronMayne/70a46e73f3af7fb9fec7437174dd4858
from mybox.
Finally! Now UnityEvent works with ConditionalAttribute and comes with a few nice improvements! Thanks to the Bryon, almost after half of a year I'm able to close this issue 😁
@woistjadefox, you probably should remove your CollapsableEventDrawer.cs before you'll grab the latest commit of MyBox
from mybox.
Related Issues (20)
- Bug: Waiting for user code in MyBox.dll to finish executing HOT 3
- Crash in MySerializedProperty
- Constant errors with conditional field
- Enter Play mode being slower after install the package HOT 5
- Release with .unitypackage HOT 1
- Naming Conflit HOT 1
- Editor takes a long time in "MyEditorEvents.OnWillSaveAssets" HOT 4
- [ButtonMethod] not work in list item HOT 9
- Passing a List or Array to DefinedValues HOT 3
- ConditionalField does not work when RegexString is used on the same fields HOT 1
- Missing def for Attributes/DefinedValuesAttribute.cs HOT 1
- ConditionalFieldAttribute is rather slow HOT 3
- Suggestion: Help boxes
- Using [ConditonalField] causes Editor Button to be drawn twice HOT 2
- ReadOnly HOT 1
- "No GUI Implemented" when using a UIElement Property Drawer with Default Inspector. HOT 5
- MyEditorAudio.cs not found. HOT 1
- DefinedValues w. method is null HOT 4
- [ConditionalField] doesn't work with lists or arrays HOT 1
- Foldout doesn't work properly in child classes
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mybox.