Future Sandbox APIs

We want to get feedback on what Unity APIs should be added to the scripting system.
If you want to see an API added, please provide the API (i.e. Lights) and a use case or example (i.e. Day/Night cycle).

Currently unfinished and planned APIs and their use cases:

  • Animator and Animation components
    • Moving platforms
    • Day night cycle
  • Vector Math
    • 3D Games

We look forward to hear your feedback and see what projects you’re working on! :blue_heart:

4 Likes

NavMesh

NavMeshes in Unity are “spatial queries” that can compute “pathfinding and walkability tests.” This would allow creators to be able to make creations such as:

  • Enemy AIs
  • Terrain Navigation
  • Descending Movement
    • For example, using a Height Mesh to navigate an agent down the stairs at realistic speeds
  • And plenty more examples…

To implement this correctly, the following classes will need to be implemented and sandboxed:

The following classes may also need to be forwarded as Editor Only Descriptors for the build process:

UnityEngine.AudioSource and UnityEngine.AudioClip

Use Case

Having some of the properties and methods exposed would allow for all kinds of cool things, ranging from basic audio control to rhythm games or even creating full-blown synthesizers and music creators.

Some of the methods listed here could be exploitable or abusable, but having at least the basic ones would already be a great addition!


Properties

  • clip
  • isPlaying
  • loop
  • volume
  • pitch
  • time (maybe even timeSamples?)

Methods

  • Play()
  • PlayOneShot() (Potential for spamming one-shot sounds?)
  • Pause()
  • UnPause()
  • Stop()
  • GetSpectrumData() (Might be performance-heavy?)

UnityEngine.AudioClip

Some properties and methods from AudioClip could also be useful:

Properties

  • frequency
  • length
  • samples

Methods

  • LoadAudioData()
  • UnloadAudioData()
  • GetData() / SetData()
  • static Create()

The last two methods (GetData() / SetData() and Create()) really arent important but could be interesting.

Exposing these could enable advanced audio scripts, like synthesizers that generate sound from scratch. However, they could also be prone to abuse. Definitely not essential in the slightest but could still be a cool addition.