Skip to content

How can I add initial text in InputField? #97

Open

Description

@tyhbj

I already knew how to set default video in Usharp video.But I need to preset some text in the input box,cause I need to have the video cloud resolution prefix to play bilibili videos in VRC.
For example,when i play a bilibili video such as"https://www.bilibili.com/video/BV1btHZexEXw",i should add "https://biliplayer.91vrchat.com/player/?url=", combine into "https://biliplayer.91vrchat.com/player/?url=https://www.bilibili.com/video/BV1btHZexEXw"
I want just paste only one url to change video in my world,help me please .

Activity

  1. jacklul commented on Dec 30, 2024

    @jacklul
    Contributor

    Udon is not allowed to modify user's URL input for security reasons.

  2. tyhbj commented on Jan 1, 2025

    @tyhbj
    Author

    Udon is not allowed to modify user's URL input for security reasons.

    Thank you for your answer. As far as I know, the input of this world is preset with text."https://vrchat.com/home/world/wrld_29e92dbd-b1fa-479a-a53d-1f312cb54570/info", I don't know if it depends on udon.

  3. jacklul commented on Jan 1, 2025

    @jacklul
    Contributor

    You can set field's default value in Unity but that's it, the user might delete the whole contents instead of pasting after it.
    You can also use Udon to reset the field to that value after each URL load (OnUSharpVideoLoadStart callback).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions