Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7522927
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T02:39:05+00:00 2026-05-30T02:39:05+00:00

Is it possible to control the scene in the Unity3D Plugin by using JavaScript?

  • 0

Is it possible to control the scene in the Unity3D Plugin by using JavaScript? The JavaScript-Code should run in the context of the browser and not in the context of the Unity3D Plugin?

I have to transform, delete and add objects in the scene.

Perhaps do you have an example.

Thanks for any advice.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T02:39:07+00:00Added an answer on May 30, 2026 at 2:39 am

    Yes, it’s possible – at least, I know I’ve done it, but it was quite some time ago.

    Here’s the demo page I put together back then.

    Feel free to look in the page’s source code. Most of it comes from Unity’s docs and examples. I just made a simple wrapper for the sending and receiving of messages to/from the Unity web player, and adapted the code a little.

    My code is based on Prototype.js, so you’ll have to do some minor rewrites if you’re using jQuery (like most people these days), but it shouldn’t be too bad. Or you can just use Unity’s pre-made stuff.

    I’m not usually a Unity coder so I can’t tell you exactly how to set up the Unity-side of things (I did make the simple shader-based demo you see, but I’ve lost the source files, I think), but as I recall, it was simply a matter of creating a game object with a set of public methods. Those methods can then be called via JavaScript. Simple as that.

    Basically, from the JS-side, all you have to do is this:

    var player = document.getElementById("UnityObject");
    player.sendMessage("name of game object", "name of method", "argument");
    

    You can also send messages from the a GameObject back to JavaScript, if you want. It doesn’t happen in the demo, but it should work. Check the source for details.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: JavaScript Function Definition in ASP User Control Hi, I have a generic
Is it possible to get and control a validation group using javascript? I was
Some SONY Cameras have a FireWire interface. Is it possible to control any camera
Possible Duplicate: User control javascript I defined a JavaScript function inside a user control.
Possible Duplicate: How to embed a web browser control in a cross-platform application? I'd
i have a scene with a multiple (QGraphicsTextItem)s, and i need to have control
Is is somehow possible to control letter spacing when using Graphics.DrawString? I cannot find
Is it possible to control when the UITableView scrolls in my own code. I
I want to know if it's possible to control Microsoft Speech Recognition using c#.
In XCode (4.1) is it possible to control whether or not a particular build

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.