subjectnerd-unity / reorderableinspector Goto Github PK
View Code? Open in Web Editor NEWAutomatic reorderable lists for Unity game engine components
License: MIT License
Automatic reorderable lists for Unity game engine components
License: MIT License
Hello,
Nice library. It seems to work fine on most cases but I encounter an issue making all the other fields readonly:
When I remove the reoderable attribute the fields become enabled:
My class is a scriptable object:
[Serializable]
public class SpellNode : ScriptableObject
{
[Reorderable]
[SerializeField]
protected List<SpellSlotType> m_slotDefinition = null;
[Header("General")]
[SerializeField]
protected string m_guid = string.Empty;
[SerializeField]
protected Sprite m_icon = null;
[SerializeField]
protected string m_name = string.Empty;
[SerializeField]
[TextArea]
protected string m_rawDescription = string.Empty;
I tried uncommenting this, but it has no effect
#define EDIT_ALL_SCRIPTABLES
Thanks!
I found with Unity 2022.3.f14 and above, that the presence of ReorderableArrayInspector.cs in the project will stop the LMB+RMB from working in the scene view.
This might be related to this fix in f14
I have also reported the bug to Unity.
It works well in Unity5.x version.
But if you import this package into an empty project of Unity2019 version,an error will popup when you click the Layout button in the upper right corner:
"Menu Window/Layouts couldn't be found"
hi.
thanks for this excellent project
i am having some trouble getting it to work from GridBrushEditor
Custom inspectors will not automatically draw arrays as ReorderableLists unless they inherit from ReorderableArrayInspector.
i made this simple test project.
in the real project i have more code in GridBrushEditor
https://github.com/rakkarage/TestReorderableInspector
any way to get working?
thanks
Awesome plugin! I just wanted to report that this setting looks weird in the inspector:
[Serializable]
public struct KeyAction
{
public KeyCode keyCode;
public UnityEvent action;
}
[Reorderable("Element", true, true)]
public List<KeyAction> Mapping;
NullReferenceException: Object reference not set to an instance of an object
UnityEditor.EditorStyles.get_helpBox () (at <c84609c921cb488481d7d8a5fcdf9588>:0)
SubjectNerd.Utilities.ReorderableArrayInspector.InitInspector () (at Assets/Scripts/Plugins/Utilities/Reorderable/Editor/ReorderableArrayInspector.cs:323)
SubjectNerd.Utilities.ReorderableArrayInspector.OnEnable () (at Assets/Scripts/Plugins/Utilities/Reorderable/Editor/ReorderableArrayInspector.cs:308)
I must already derive from GridBrushEditor (tho i not use any GUI) so I cannot derive from ReorderableArrayInspector!?
Why does my CustomPropertyDrawer work in this situation but not Reorderable?
Is there any way to make it work?
I need to make a custom drawer or a ReorderableArrayInspector
Thanks.
https://en.wikipedia.org/wiki/Composition_over_inheritance
edit:
Custom inspectors will not automatically draw arrays as ReorderableLists unless they inherit from
ReorderableArrayInspector
.
If not auto then how please? tried [Reorderable]...
So that people won’t have to muck around within the package, add assembly definition files. One that should only be linked to in the Editor, another for all platforms.
When you set the attribute "Reorderable"to a custom class array or list, it is displayed as a Reorderable list, but when you expand an element the list size does not expand, and the expanded element fields are displayed on top of other elements
Unity 2018.2.0f2
Hi
When trying to run a project with ReorderableInspector added, I get the following error;
Assets\ReorderableInspector\Editor\ReorderableArrayInspector.cs(185,21): error CS0619: 'EventType.dragUpdated' is obsolete: 'Use DragUpdated instead (UnityUpgradable) -> DragUpdated'
Unity 2019.2.13.f1
Olly
Maybe we need a #if line.
Unity editor is very slow if reorder List has large struct and large array elements.
worked perfectly in 2020.1.17
http://va.lent.in/unity-make-your-lists-functional-with-reorderablelist/
Appears to be dead
at
https://github.com/SubjectNerd-Unity/ReorderableInspector/wiki/Custom-Inspectors#extending-reorderablelist-functionality
Would love to see more about the callbacks.
Actually I'm just looking for a way to set the element's name easily (not all the elements the same name).
If you use a serializable class not inheriting from MonoBehaviour then a string name
field will show as the element name, but when using a MonoBehaviour subclass name
does not show (even if you override with the new
operator).
Thanks!
Expected: Context Menu buttons are still there
Actual: Context Menu buttons disappear. They appear again when the object is deselected and then selected again.
Reproduction:
1.Create a public UnityEvent type field in any script.
2.Attach this script to a gameObject of the scene.
3.Popup the error.
Solution(I GUESS):
Check if the object parameter is null at the first line of GetValue method.
Just curious if this is supported, and I'm asking as it is technically a different purview from the Editor subclass you have created.
seems to stop working after around 10 items? or
Example:
https://github.com/rakkarage/TestReorderableInspectorNew
edit:
after more editing i got my code under the limit
maybe it is just a reasonable limitation by unity or ri
Upon recompilation of scripts, an error consistently pops up
NullReferenceException: Object reference not set to an instance of an object
UnityEditor.EditorStyles.get_helpBox () (at C:/buildslave/unity/build/Editor/Mono/GUI/EditorStyles.cs:195)
SubjectNerd.Utilities.ReorderableArrayInspector.InitInspector () (at Assets/ThirdParty/SubjectNerd/ReorderableInspector/Editor/ReorderableArrayInspector.cs:326)
SubjectNerd.Utilities.ReorderableArrayInspector.OnEnable () (at Assets/ThirdParty/SubjectNerd/ReorderableInspector/Editor/ReorderableArrayInspector.cs:311)
This is the line throwing the null ref error:
styleEditBox = new GUIStyle(EditorStyles.helpBox) { padding = new RectOffset(5, 5, 5, 5) };
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.