Cursor

FlowCanvas Forums Support Cursor

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1850
    DarkNBlood
    Participant

    How can I translate this to Flow ?
    Cannot find Cursor static method (from UnityEngine namespace). If I import whole UnityEngine namespace, I have errors 🙁

    `public void SetCursorState(CursorLockMode mode)
    {
    Cursor.lockState = mode;
    // Hide cursor when locking
    Cursor.visible = (CursorLockMode.Locked != mode);
    }

    #1857
    Gavalakis
    Keymaster

    Hello again 🙂

    You don’t really need to add the whole UnityEngine namespace. That will only bloat the menus 🙂
    Just add the types you need in the Preferred Types Editor. Search for “Cursor” and add Cursor and CursorLockMode types.
    PreferredTypesAddType

    Then the code you want to achieve, can be created with a custom function like this:
    SetCursorState

    (The “Not Equal” node by the way, can be found in “Functions/Implemented/Logic Operators\Any” category).

    If you have any questions, or need any further clarification, please let me know.
    Thanks!

    Join us on Discord: https://discord.gg/97q2Rjh

    Attachments:
    You must be logged in to view attached files.
    #1863
    DarkNBlood
    Participant

    Thanks, working fine !!! 😀

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.