pixeyehq / inspectorfoldoutgroup Goto Github PK
View Code? Open in Web Editor NEWGroup variables in Unity 3d inspector with style!
License: MIT License
Group variables in Unity 3d inspector with style!
License: MIT License
You've probably moved on and abandoned this project, but I'm reporting this issue anyway because it makes the "InspectorFoldoutGroup" scripts unusable -- and I would very much like to use them for my game project:
The "expanded" bool that defines the folded state of a Foldout group is never saved.
When you deselect an object that uses the Foldout groups, or when you simply run the game in the editor, the Foldout groups are immediately closed. All of them.
Of course normally you would expect them to remember their last state, so that you don't have to reopen them by hand all the time.
(I'm on Unity 2018.3.6f1 btw.)
Works great! But doesn't as soon as you define an editor script for that class. Anyone figured out any workarounds for this?
was excited to use this, doesn't do anything tho, using as referenced in the readme
I'm using Unity 2018.2.15f1
Thanks for this I love it, I found I had to remove this line from the files to get it working:
using Homebrew;
Imported: "Homebrew" folder from zip
Console: missing a using directive in "EditorOverride.cs" (using Homebrew; - not found)
Removed - no errors found
Try: [Foldout("sample")] var myVar; - nothing appear in Inspector.
-any fix?-
If override RenderStaticPreview in editor plugin then foldout stopped drawing.
Best fucking editor script ive seen in my life. <3
In Unity versions 2017/2018 the foldout attribute looked identical to the gifs on this repo but in later versions of Unity the way the foldout is rendered looks off? The arrow isn't in line (top left of image) and there's now block-coloured rectangles around each variable (not sure if this is intended - it wasn't like that before).
EditorPrefs.SetBool(string.Format($"{c.Value.atr.name}{c.Value.props[0].name}{target.GetInstanceID()}"), c.Value.expanded);
InstanceIDs are not constant and changing all the time, for every different object, for every different scene, for every different Unity session and for every play mode change. So you're constantly filling Windows Registry by setting new bools for all foldout changes. And registry record changes the name with foldout name so after a while, it is hard to keep track, they're all over the place.
My Unity registry 20-30x bigger size right now with all temporarily used instance ids.
Also the behavior was wrong so I was changed a while ago. Because I don't want to set foldout expand seperately for every object, they should have all expanded or all folded for same foldout with single click, like as Unity foldouts.
EditorPrefs.SetBool(string.Format($"{c.Value.atr.name}{c.Value.props[0].name}"), c.Value.expanded);
This is better behavior and also won't create thousands of registry.
Is it possible when using foldEverything to add an option to serialize all fields in the group?
Saves having to add the [SerializeField] attribute to every line.
Thanks!
Array items made of simple classes doesn't fold:
[System.Serializable]
public class Player
{
[Foldout("DATA OBJECT", true)]
public int hp;
public int attack = 20;
[Foldout("DATA ATTACK")]
public int AT;
}
public class PlayerManager : Monobehaviour
{
public List<Player> _Players;
}
The cache.expanded attribute doesn't seem to work. When returning to a object, the expanded states are all returned back to default state.
The foldout doesn't even show in inspector. No error found in code or Unity itself.
Yet, the attribute works fine in 2020.2.1f1 and others 2020 versions. If any one find a fix to it, please feel free to share.
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.