hi gil i have spent a lot of time in dealing with ui plz help
In order to help understanding, I will divide my situation into several.
Goals to achieve: various resolutions on mobile (default 9:16)
My current situation:
My basic settings(exclude ork):
All canvases are using the Canvas Scaler component.
Scale With Screen Size
X 1080 Y 1920
Match Mode: Expand
And all my ui anchors are centers.
-So no matter what resolution I change,
ui is neither scaled nor moved. (because of canvasScaler Component ( not include _OrkCanvas)
(Empty parts are letterboxed in black)
My current ork editor settings:
Default Screen Size 1080 1920
Gui Scale Mode: NO SCALE (because it should not be scaled)
GUI Anchor: Middle Center (because we want to keep it at a constant offset from the center of the canvas)-But after playing the game, things like HUD are not anchored in the center. (In _OrkCanvas)
There are many questions about Orcs.
Why is CanvasScaler not attached to _OrkCanvas created after the game is run ??
If you have a canvas scaler, responding to all resolutions is really a simple matter.
However, Oak Editor has some unfamiliar features such as GUI Scale Mode and GUI Anchor.
These are not working as I want.
In other words,
I want all of Ork's GUI (NEW ui) to work like my existing canvas.
1. All elements in the canvas are anchored in the center.
-The ork canvas created at runtime cannot be adjusted manually.
2. Elements in the canvas are not moved or scaled at any resolution.
-This feature already exists in Canvas Scaler's ScaleWithScreensize-Expand. However, Ork Canvas does not have a scaler component.
The ORk Framework doesn't seem to be designed to work as a canvas scaler function (which I want). Is that correct?
The canvas scaler component
When the aspect ratio is the same, scaling is performed at the same ratio.
For example, the size of a UI element at 1080 X 1920 and the size of a UI element at 540 X 960 are the same.
However, Orc seems to place the UI based on fixed coordinate values (X, Y coordinates). And it doesn't handle scaling between different sizes of the same aspect ratio (1080 X 1920: 540 X 960).
Therefore, if it deviates from the set resolution (1080X1920), UI placement becomes strange.
The solution I was thinking of,
All menu screens and numerous HUDs
Make them all prefabs at runtime.
Then, after exiting the play mode, place them in the scene view.
Manage them with Set Active ON / OFF.
Will this work?
You can try to get ORK's UI look the way you want it too, e.g. by using multiple GUI layers with their own anchor settings for UI placement (e.g. upper left, upper right, etc.).
The only other option is to create your custom UI and feed it with ORK information via scripting.
Making prefabs out of ORK's runtime UI will not work, as that'd not update them when using them at a later time.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Yes it's definitely an old ui way, so it seems very inconvenient to customize (Custom placement and various animation and fx effects, etc ..)
So, are you saying that I can make my own custom ui through scripting?
Things like simple data display seem to be easy,
However, can advanced features such as crafting be implemented custom through scripting?
Actually, I want to implement all the oak ui (menu screen, HUD, FLYING TEXT, ETC ..) with my canvas (for custom effect).
Is it possible?
Thanks in advance !!
Crafting is actually an easier one. It's for battle system and some combat that you might need to add few delegates in source code. But overall nothing too complicated.
@Fashtas postes some tutorials as well:
http://forum.orkframework.com/discussion/5870/tutorial-grid-based-inventory-system-drag-and-drop-equipment-slots#latest
http://forum.orkframework.com/discussion/5871/tutorial-custom-made-shortcut-bar#latest
Wow .. Fantastic game video
Did you make it?
After testing with Brown Pants character,
It feels like using a different asset.
All the features in the video you uploaded (custom crafting, inventory, drag and drop) are all what I want.
May I ask you a few questions?
1. What Unity version are you using?
and ..
2. I just read all about the two links. (inventory and skillbar) In addition to this, are there any resources I can refer to to implement crafting, custom shops, custom enhancement systems, etc. ??
Should I refer to ork's api site?
3.I want to make all HUD, UI custom, like your fancy game (NOT ork's gui box and HUD's 'use bar' toggle)
Is it all possible? I want to know the limitations of OrK framework.
Thank you for answer.
The best way to learn is to look at ORK source code that comes with ORK once you purchase it. It's in a zip in ORK folder. If you don't understand something you can ask here and gamingislove (The one man army behind ORK and plugin author :D) and sometimes other fellow ork users will help you out.
http://orkframework.com/tutorial/howto/setting-up-project-references/
You can also email gamingislove about commissions. http://orkframework.com/support/
You can do almost everything that native ORK UI does from your own scripts. To access somethings you might need to make small source code modifications, which should allow you do do whatever you want from ORK.
I can share with you my custom code also, but I use other plugins along with ORK, so it won't be something you can just copy over to your project and make it work. But, should give you the idea.
I'm happy to hear that scripting can implement functionality similar to all native ui in Ork.
My goal is only conversion from native ui to ui using my canvas.
For other ui implementations except inventory and skill short cut bar (two links above), I may need help.
Yes, any help, including your custom code, would be appreciated!
I have a lot of different plugins (doozy ui, Odin Inspector, Dialogue / Quest System (PixelCrusher), node / flow canvas and more)
If possible, is there a means to contact you?
If you have discord: Hellwalker#2968
Have a nice day : )