Any views expressed within media held on this service are those of the contributors, should not be taken as approved or endorsed by the University, and do not necessarily reflect the views of the University in respect of any particular issue.

Sound Design-Code Part

Code Part:

Many sound events follow the events in the unity scene, such as the sound of burning fire, raining , so most of the functions of playing sound are through “AkSoundEngine. PostEvent(“Event name”, gameObject) in C# inside the unity project.

RTPC in C#:

Because the change of our unity scene is not achieved by the timeline code, when using RTPC to change the ambient sound day and night, I cannot directly correspond the  RTPC to time, so with the help of our tutor, we use “0” and “1 ” to correspond to “day” and “night” events.

VRController button sound:

We want to play the sound of the tree growing when the VR controller button is pressed, because pressing the button is the player’s own control of the growing process.

The code we used(But not worked, still not to debug):

void Update()
{
if (Input.GetButtonDown(“ButtonName”))
{
AkSoundEngine.PostEvent(“Play_Growth”, gameObject);
}
}

void Update()
{
if (Input.GetButtonUp(“ButtonName”))
{
AkSoundEngine.PostEvent(“Stop_Growth”, gameObject);
}
}

Leave a Reply

css.php

Report this page

To report inappropriate content on this page, please use the form below. Upon receiving your report, we will be in touch as per the Take Down Policy of the service.

Please note that personal data collected through this form is used and stored for the purposes of processing this report and communication with you.

If you are unable to report a concern about content via this form please contact the Service Owner.

Please enter an email address you wish to be contacted on. Please describe the unacceptable content in sufficient detail to allow us to locate it, and why you consider it to be unacceptable.
By submitting this report, you accept that it is accurate and that fraudulent or nuisance complaints may result in action by the University.

  Cancel