Smart NPCs Quick Start Guide
Smart NPCs Quick Start GuideAdding Your First Smart NPC
Adding Your First Smart NPCMethod 1: Through Code
Method 1: Through Codeusing SkillfulAI.SmartNPCs;
using UnityEngine;
public class ExampleSmartNPC : MonoBehaviour
{
private void Start()
{
// Add the Smart NPC component
SmartNPC myNpc = gameObject.AddComponent<SmartNPC>();
// Set a voice by category
VoiceSelector.SetVoiceByCategory(myNpc, VoiceCategories.Female);
// Set the output audio source for the NPC.
myNpc.audioSource = gameObject.AddComponent<AudioSource>();
// Make the NPC speak!
myNpc.Speak("Hello! I'm your first Smart NPC!");
}
}Method 2: Using the Unity Inspector
Method 2: Using the Unity Inspector
Voice Selection Options
Voice Selection OptionsCustomizing Voice Settings
Customizing Voice SettingsIntegrating with Skillful Agents
Integrating with Skillful AgentsManaging Speech Queue
Managing Speech QueueCreating a Basic Dialogue System
Creating a Basic Dialogue SystemNext Steps
Last updated