Skip to content
Snippets Groups Projects
Commit 7c4ed073 authored by Samuel Truman's avatar Samuel Truman
Browse files

Init Articy flow player

parent 14b798d3
No related branches found
No related tags found
No related merge requests found
......@@ -34,9 +34,9 @@ public override void OnConfigureScene() {
var dialogObj = PrefabUtility.InstantiatePrefab(dialogPrefab) as GameObject;
dialogObj.transform.SetParent(avatarObj.transform);
dialogObj.transform.position = avatarObj.transform.position + dialogSpawnOffset;
// config dialog
// instance.GetComponent<ArticyFlowPlayer>().StartOn = ArticyDatabase.GetObject(testArticyDialogId);
var dialog = dialogObj.GetComponent<Dialog>();
dialog.avatarName = avatar.name;
dialog.dialogId = avatar.dialogueId;
}
}
......
......@@ -14,6 +14,8 @@ GameObject:
- component: {fileID: 583540011480971671}
- component: {fileID: 583540011480971667}
- component: {fileID: 583540011480971675}
- component: {fileID: 8756591529390447279}
- component: {fileID: 7161522334836786125}
m_Layer: 5
m_Name: Dialog New
m_TagString: Untagged
......@@ -137,6 +139,45 @@ MonoBehaviour:
m_EditorClassIdentifier:
camera: {fileID: 0}
invert: 1
--- !u!114 &8756591529390447279
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 583540011480971668}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 149237616, guid: df2ec02f61e861546b9427c26ccacb8d, type: 3}
m_Name:
m_EditorClassIdentifier:
useDefaultGlobalVariables: 1
globalVariables: {fileID: 0}
overwriteMethodProvider: 0
overwrittenMethodProvider: {fileID: 0}
startOn:
instanceId: 0
referencingMode: 0
lowId: 0
highId: 0
pauseOn: 7
ignoreInvalidBranches: 1
continuouslyRecalculateBranches: 0
continouslyRecalculateInterval: 1
--- !u!114 &7161522334836786125
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 583540011480971668}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 101bbb0b25024acaa2dfe9ec266aac6f, type: 3}
m_Name:
m_EditorClassIdentifier:
articyId:
avatarName:
--- !u!1 &1235909505916248862
GameObject:
m_ObjectHideFlags: 0
......
......@@ -4,6 +4,6 @@ public class AvatarData {
public string name;
public string token;
public string sceneObject;
public string dialogId;
public string dialogueId;
}
}
\ No newline at end of file
using System;
using Articy.Unity;
using UnityEngine;
namespace de.jmu.ge.viavr.dialogs.runtime {
[RequireComponent(typeof(ArticyFlowPlayer))]
public class Dialog: MonoBehaviour {
public string dialogId;
public string avatarName;
private ArticyFlowPlayer articyFlowPlayer;
private void Awake() {
articyFlowPlayer = GetComponent<ArticyFlowPlayer>();
}
private void Start() {
var id = Convert.ToUInt64(dialogId, 16);
articyFlowPlayer.StartOn = ArticyDatabase.GetObject(id);
// articyFlowPlayer.Play();
}
}
}
\ No newline at end of file
fileFormatVersion: 2
guid: 101bbb0b25024acaa2dfe9ec266aac6f
timeCreated: 1699546010
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment