Emerald AI
A demo scene named "USK & Emerald AI" is located in the (Demo Files/Scenes/AI Systems Integrations) folder.
1. Download the asset and then enable the integration with it in the (Window -> USK -> Integrations Manager).
2. Add the following code to the EmeraldAIPlayerDamage script.
1
#if USK_EMERALDAI_INTEGRATION
2
DamageUSKCharacter(DamageAmount);
3
#endif
4
​
5
#if USK_EMERALDAI_INTEGRATION
6
void DamageUSKCharacter(int value)
7
{
8
if (GetComponent<GercStudio.USK.Scripts.Controller>() != null)
9
{
10
var controller = GetComponent<GercStudio.USK.Scripts.Controller>();
11
controller.Damage(value);
12
}
13
}
14
#endif
Copied!
3. Follow the Emerald manual to add enemies to the scene, then add a USK Character there.
4. Make sure your enemies have the correct Detection Layers.
Last modified 1mo ago
Copy link