arrow-left

All pages
gitbookPowered by GitBook
1 of 4

Loading...

Loading...

Loading...

Loading...

AnythingSpeech

This module allows developers to access the Anything World TTS (Text-to-speech) engine.

hashtag
AnythingSpeech Class Reference

hashtag
Public Member Functions

delegate void AWSpeechHandler (string testResponse)

delegate void AWSpeechDoneHandler (string testResponse)

void StartListening (AWSpeechHandler responseCallback, AWSpeechDoneHandler doneCallback)

hashtag
Member Functions

hashtag
AWSpeechDoneHandler()

delegate void AnythingWorld.Speech.AnythingSpeech.AWSpeechDoneHandler (string testResponse)

hashtag
AWSpeechHandler()

delegate void AnythingWorld.Speech.AnythingSpeech.AWSpeechHandler (string testResponse)

hashtag
ListenForInterval()

void AnythingWorld.Speech.AnythingSpeech.ListenForInterval (float time, AWSpeechDoneHandler doneCallBack)

circle-info

Listen for a specified amount of time and receive a string to a callback.

hashtag
ListenForInterval()

void AnythingWorld.Speech.AnythingSpeech.ListenForInterval (float time, AWSpeechHandler responseCallBack, AWSpeechDoneHandler doneCallBack)

hashtag
Speak()

void AnythingWorld.Speech.AnythingSpeech.Speak (string thingToSay, string voiceName = "none")

circle-info

Use speech synthesis to say input string.

hashtag
StartListening()

void AnythingWorld.Speech.AnythingSpeech.StartListening (AWSpeechDoneHandler doneCallback)

hashtag
StartListening()

void AnythingWorld.Speech.AnythingSpeech.StartListening (AWSpeechHandler responseCallback, AWSpeechDoneHandler doneCallback)

circle-info

Activates voice input and starts listening to the user.

hashtag
StopListening()

void AnythingWorld.Speech.AnythingSpeech.StopListening()

circle-info

Deactivate voice input and stop listening.

hashtag
Property

hashtag
Instance

AnythingSpeech AnythingWorld.Speech.AnythingSpeech.Instance

hashtag
Parameters

Parameters
Definition

hashtag
Example

void StartListening (AWSpeechDoneHandler doneCallback)

void StopListening ()

void Speak (string thingToSay, string voiceName="none")

void ListenForInterval (float time, AWSpeechDoneHandler doneCallBack)

void ListenForInterval (float time, AWSpeechHandler responseCallBack, AWSpeechDoneHandler doneCallBack)

time

Time in seconds to listen.

responseCallBack

Callback handling any detected changes to the input string during listening.

doneCallBack

Callback handling the final detected string once listening completed

thingToSay

String to vocalise

voiceName

Name of voice

using AnythingWorld.Speech;

public class SpeechController: MonoBehaviour
{  
    void Start()
    {
        AnythingSpeech speech = AnythingSpeech.Instance;
        speech.Speak("Hello Anything World");
    }
}

AnythingHabitat

This class allows you to make generated habitats using the Anything World habitat engine.

hashtag
AnythingHabitat Class Reference

hashtag
Public Member Functions

void MakeHabitat (string habitatName, bool createCreatures)

void MakeHabitat (string habitatName)

hashtag
Member Functions

hashtag
MakeHabitat()

void AnythingWorld.Habitat.AnythingHabitat.MakeHabitat (string habitatName)

hashtag
MakeHabitat()

void AnythingWorld.Habitat.AnythingHabitat.MakeHabitat (string habitatName, bool createCreatures)

hashtag
Property

hashtag
Instance

AnythingHabitat AnythingWorld.Habitat.AnythingHabitat.Instance

hashtag
Parameters

Parameters
Definition

hashtag
Example

habitatName

createCreatures

using AnythingWorld.Habitat;

public class MakeHabitat: MonoBehaviour
{
    public string MyHabitat;
   
    void Start()
    {
         AnythingHabitat habitatCreator = AnythingHabitat.Instance;
         habitatCreator.MakeHabitat(MyHabitat);
    }
}

AnythingCreator

This class allows you to access the Anything World creation engine to make objects in runtime using code.

hashtag
AnythingCreator Class Reference

hashtag
Public Member Functions

List< AWObj > MakeManyObjects (string objName, int quantity, bool hasBehaviour=true)

AWObj MakeObject (string objName, bool hasBehaviour=true, bool hasCollider=true)

AWObj MakeObject (string objName, Transform parentTransform, bool hasBehaviour=true, bool hasCollider=true, bool positionGlobally=false)

hashtag
Member Functions

hashtag
MakeManyObjects()

List< AWObj > AnythingWorld.AnythingCreator.MakeManyObjects (string objName, int quantity, bool hasBehaviour = true)

hashtag
MakeObject()

AWObj AnythingWorld.AnythingCreator.MakeObject(string objName, bool hasBehaviour = true, bool hasCollider = true)

hashtag
MakeObject()

AWObj AnythingWorld.AnythingCreator.MakeObject (string objName, Transform parentTransform, bool hasBehaviour = true, bool hasCollider = true, bool positionGlobally = false)

hashtag
MakeObject()

AWObj AnythingWorld.AnythingCreator.MakeObject (string objName, Transform transform, Transform parentTransform, bool hasBehaviour = true, bool hasCollider = true, bool positionGlobally = false )

hashtag
MakeObject()

AWObj AnythingWorld.AnythingCreator.MakeObject (string objName, Vector3 objectPos, bool hasBehaviour = true, bool hasCollider = true)

hashtag
MakeObject()

AWObj AnythingWorld.AnythingCreator.MakeObject (string objName, Vector3 objectPos, Quaternion objectRot, bool hasBehaviour = true, bool hasCollider = true)

hashtag
MakeObject()

AWObj AnythingWorld.AnythingCreator.MakeObject (string objName, Vector3 objectPos, Quaternion objectRot, Vector3 objectScale, bool hasBehaviour = true, bool hasCollider = true)

hashtag
MakeObject()

AWObj AnythingWorld.AnythingCreator.MakeObject (string objName, Vector3 objectPos, Quaternion objectRot, Vector3 objectScale, Transform parentTransform, bool hasBehaviour = true, bool hasCollider = true, bool positionGlobally = false)

hashtag
Property

hashtag
Instance

AnythingCreator AnythingWorld.AnythingCreator.Instance

hashtag
MadeThings

Dictionary<string, List > AnythingWorld.AnythingCreator.MadeThings

hashtag
Parameters

hashtag
Returns

Reference to of the object being made. Objects are generated asynchronously, make the status of your object attached to AWObj can be queried using the ObjectMade bool property.

hashtag
Example

AWObj MakeObject (string objName, Transform transform, Transform parentTransform, bool hasBehaviour=true, bool hasCollider=true, bool positionGlobally=false)

AWObj MakeObject (string objName, Vector3 objectPos, bool hasBehaviour=true, bool hasCollider=true)

AWObj MakeObject (string objName, Vector3 objectPos, Quaternion objectRot, bool hasBehaviour=true, bool hasCollider=true)

AWObj MakeObject (string objName, Vector3 objectPos, Quaternion objectRot, Vector3 objectScale, bool hasBehaviour=true, bool hasCollider=true)

AWObj MakeObject (string objName, Vector3 objectPos, Quaternion objectRot, Vector3 objectScale, Transform parentTransform, bool hasBehaviour=true, bool hasCollider=true, bool positionGlobally=false)

Local scale to be applied to request object.

parentTransform

Transform

Transform that new object will be parented to.

transfrom

Transfrom

transform to be applied to object after creation

hasBehaviour

bool

Will object receive default behaviour & animations.

hasCollider

bool

Will object receive automatically generated collider around model.

positionGlobally

bool

Will object be applied globally? (Default: false, locally)

Parameters

Type

Definition

objName

string

Name of object to be requested from server.

objectPos

Vector3

Position in scene to be applied requested object.

objectRot

Quaternion

Local rotation to be applied to requested object.

objectScale

AWObj

Vector3

using AnythingWorld;
public class MakeSingleObject : MonoBehaviour
{
    public string objectToName = "cat";
    
    void Start()
    {
        AnythingCreator.Instance.MakeObject("cat");
    }
}
public class MakeObjectQuaternion : MonoBehaviour
    {
        public string objectToMake = "dog";
        public Vector3 vectorPosition = new Vector3(2, 1, 2);
        public Quaternion quaternionRotation = Quaternion.identity;
        private void Start()
        {
            AnythingCreator.Instance.MakeObject(objectToMake, vectorPosition, quaternionRotation);
        }
    }
using AnythingWorld;

public class MakeObjectFullCustom : MonoBehaviour
{
    public string objectToMake;
    public Vector3 objectPos;
    public Quaternion objectRotation;
    public Vector3 objectScale;
    public Transform parentTransform;
   
    void Start()
    {
        AnythingCreator.Instance.MakeObject(objectToMake, objectPos, objectRotation, objectScale, parentTransform);
    }
}

API References (Legacy)