edited January 2020 in ORK Support
So I have a canvas slider with code that ping pongs the value back and forth. On press, I'd like to return the value to ork and see if it's within a certain range, making the crafting is successful.

Except I'm not sure how to combine the old UI and being able to use a canvas on the same screen because it loads behind the UI menu so I can't press the slider until I exit the crafting menu. Then once I enter back, if the value's in the right range the creation will succeed.

My goal right now is to be able to click create, spawn the slider from a prefab and have the slider be accessible right away without leaving the crafting menu. Then once I hit my button when it lands, the value can be sent back to the event and the slider can disappear. Any ideas what I could do?

image
Post edited by PBoTG on
  • You could actually do that using a Value Input Dialogue to show a slider and store that value in a variable :)
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Is it possible to use the value input dialogue and add the current slider in a dialogue box I have? I need the slider to ping pong from one end to the next automatically back and forth and then stop once the player hits a button (which my current slider does now) and if the value is correct, the craft would be successful.
  • Sorry, I must have skipped over the ping pong part - so the slider is just visualizing a value and shouldn't be changed by the player? In that case the Value Input Dialogue isn't what you need.

    Spawning the slider prefab should be fine - getting the value could be done using a Field To Variable node to get the slider's value from the spawned prefab. Is the button an actual UI button or e.g. an input key?
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • So I spawn it while in the create recipe menu but it spawns behind the menu - meaning I can't access it until leaving the menu.

    It ping pongs back and forth and when an input is received it stops. I'm trying to send that value back to the event and depending on the value the craft will succeed/or fail.

    I guess I'm wondering how do I spawn it in front of the ork menu lol. It's a regular unity slider (that I have in a prefab)
  • If you're using legacy GUI in ORK and a new UI slider, that'll always be behind the legacy GUI, due to it being drawn on top of all the other stuff.
    You'd have to switch ORK to use the new UI and spawn the prefab on one of ORK's layers above the menu (which you can get from the _ORK game object).
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.