Hi,
for me this sample is “incomplete” and I’m not sure how to use narrative design keys: Narrative Design Keys | Documentation
In the sample it says it will use “Morning” or “Evening”. But in the image at Step 4 there is only “Morning” shown.
Do I need to add another item to that array / list? Again with “TimeOfDay” and then the Value “Evening”? Or how does this work?
Thanks
Ok, I got it working and understood, that I need to set the value via script.
E.g. my dummy code:
// DUMMY: Set _narrativeDesignKeyController key in _narrativeDesignKeyController to a random value of the exhibition pieces
int randomIndex = Random.Range(0, _exhibitionPieces.Count);
_narrativeDesignKeyController.UpdateTemplateKey(exhibitionPiece, _exhibitionPieces[randomIndex]);
You could mention that in the Narrative Design Keys doc. Here in this part of the doc you also have some sample code: Adding Narrative Design to your Character | Documentation
Cheers
Hello @info_AM,
Any string placed inside curly brackets within your Narrative Design section in Playground becomes a variable. You can dynamically modify this variable from Unity using the same string name.
The example provided in the documentation uses TimeOfDay, where you can set values like Morning, Evening, Night, or anything else you prefer. There’s no need to add all options at the same time—you can define and use them as needed.
If you’re looking to randomly assign values, that would require custom scripting on your end. Your approach seems correct, and we appreciate you sharing it!
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.