- Изменено
[COMBINED SKIN] Initial state
I have one more much simpler feature on my mind. Combined Skins. That one is super easy regarding the editor ui. Just convert your skin selection combobox ( popup ) into skin flag selection combobox ( popup ). That way we will be able to turn on more skins at once and it wont break anything with current projects.
Unity calls it MaskField: https://docs.unity3d.com/ScriptReference/EditorGUILayout.MaskField.html
I'm not sure yet whether this component interface should not rather be a separate Component, I also have runtime wardrobe-like changing of the active skins in mind. Then users could easily set skinComponent.layer[GlovesLayerID].skin = "ironGloves"
at runtime.
I have created an issue ticket here:
[unity] Provide component interface to set combined skins · #1633
I think the maskfield is the most cleanest solution here that does not break current projects. Are there any caveats regarding the prefab system?
Providing API for your interfaces would be nice bonus. I mean it is super easy to make combined skin from code right now.
I would be very gratefull if we can have this one in a reasonable time. :-)
foriero написалI think the maskfield is the most cleanest solution here that does not break current projects.
No, the mask field will be terrible to work with when you have many skins and only want to switch between two skins. For switching between two options, which will still be the main use-case, it doubles the effort. A mask field would only be an option if it can be switched on and off like Combine multiple skins
.
Regarding breaking current projects: Of course changing the UI will not break anything, UI changes never break anything. It's changes to structures that store the data that breaks things.
Regarding being the cleanest solution: Storing the state of a mask field when each entry is a constant bitflag is good and well-suited, but mapping mask entries to string arrays is not very clean.
In general any input is always welcome, however we need to be sure to find the optimal solution, as we will have to live with it for the years to come and don't want to break component compatibility a year later.
foriero написалI would be very gratefull if we can have this one in a reasonable time. :-)
foriero написалI mean it is super easy to make combined skin from code right now.
Glad you like the APi, do not hesitate to create your own components for specific requirements when you are in a hurry. The official components unfortunately always need to suit all users and the most common use cases, not only yours. If you like to have a mask field UI and it is a perfect UI for your task and don't have time to wait, why not create the optimal tool for your artists when they prefer it that way?
Sure enough I can write whatever. But we all strive to make Spine SHINE and be great to work with. Yes I'm thinking about other users. We push spine to the limits. :-) And years that come will prove that all our suggestions are valid. ;-) Look forward to see Combined Skins UI and Initial Anim States UI in your runtime. :-) I will be happy to help with it if you feel you need help. :-) Thank you, Herald, you do great job. Really, trust me. Appreciate all your work.
Thanks for your appreciation! We also appreciate any ideas on how to improve Spine and its runtimes, also thanks for offering help. I mainly wanted to point out that the feature needs to be well thought through before we can implement it (which is sometimes the harder part than implementing it), as we don't want to rush and be sorry later.
Hi Herald, was thinking more about the solution for the combined skins. The conclusion is the leave current Skin field intact and add one more SkinCombined ( with mentioned mask field). That way it will stay the same as it is now plus we add the functionality to show also combined skin. Do you see it?
Skin ( none, ... )
SkinCombined ( as a mask field )
Clean and nice and it won't break anything.
Does it make sense?
Thanks for sharing your idea. While I don't like displaying both elements at the same time, it brought a potential solution to my mind that could be a good solution for everyone:
Inspector normal skin mode:
Skin ( none, ... ) ["Combined Skin" mode toggle button]
When the mode toggle button is pressed, it adds a CombinedSkin
Component and switches to combined skin mode.
Inspector combined skin mode:
Combined Skin ( as a mask field ) ["Combined Skin" mode toggle button]
When toggle button is pressed again to switch back, it either a) disables or b) deletes the CombinedSkin
Component and switches back to normal skin mode.
The separate CombinedSkin
Component could then hold the necessary data (not sure yet whether this should be stored at the SkeletonRenderers or at this separate component, need to give it more thought) and perhaps provide an additional Inspector interface for the same data, where e.g. every skin entry could be a toggle button with it's name on it, sorted by folder, to prevent a very long mask selector dropdown.
e.g. like this:
Helmets
[Black][Iron] // <- [Black] is a toggle button here that will be in highlighted state when the skin is active in combined skin
Trousers
[Black][Blue][Leather]
...
So the end the SkeletonRenderer
would display the current dropdown selector or the mask selector, depending on the current skin mode, which is nice for few skins. The Inspector of the added CombinedSkin
Component would display the more sophisticated view when quick selection from many items shall be provided.
What do you think?
I think it is a bit overhead. I'm ok with just two simple fields Skin and SkinCombined :-) But sure if you want to give it special touch then go ahead. From my side i would keep it as a part of SkeletonAnimaiton or SkeletonGraphics.
Harald написалThanks for sharing your idea. While I don't like displaying both elements at the same time, it brought a potential solution to my mind that could be a good solution for everyone:
Inspector normal skin mode:
Skin ( none, ... ) ["Combined Skin" mode toggle button]When the mode toggle button is pressed, it adds a
CombinedSkin
Component and switches to combined skin mode.Inspector combined skin mode:
Combined Skin ( as a mask field ) ["Combined Skin" mode toggle button]When toggle button is pressed again to switch back, it either a) disables or b) deletes the
CombinedSkin
Component and switches back to normal skin mode.The separate
CombinedSkin
Component could then hold the necessary data (not sure yet whether this should be stored at the SkeletonRenderers or at this separate component, need to give it more thought) and perhaps provide an additional Inspector interface for the same data, where e.g. every skin entry could be a toggle button with it's name on it, sorted by folder, to prevent a very long mask selector dropdown.e.g. like this:
Helmets
[Black][Iron] // <- [Black] is a toggle button here that will be in highlighted state when the skin is active in combined skin
Trousers
[Black][Blue][Leather]
...So the end the
SkeletonRenderer
would display the current dropdown selector or the mask selector, depending on the current skin mode, which is nice for few skins. The Inspector of the addedCombinedSkin
Component would display the more sophisticated view when quick selection from many items shall be provided.What do you think?
IMHO that sounds really good :yes:
So apart from this feature and multimonitor for editor, we are ready for Rayman/Ori like title. I noticed though that the performance of spine runtime is not very optimal on ipad. :-( But I guess parallelism will come next, right?
foriero написалSo apart from this feature and multimonitor for editor, we are ready for Rayman/Ori like title.
Looking forward to it!
foriero написалI noticed though that the performance of spine runtime is not very optimal on ipad. :-( But I guess parallelism will come next, right?
It will come for sure, not "next" though. Neverthelss, we would be happy to start working on it soon, so bear that in mind when requesting features from now on. However, some spine-unity API runtime cleanup for 4.0 is highly necessary first, as this is urgent / partially breaking the API.