Skip to content
Snippets Groups Projects
Commit d89e8a48 authored by Giner, Aaron's avatar Giner, Aaron
Browse files

added unity filed, fixed some stuff

parent 84418606
No related branches found
No related tags found
No related merge requests found
Showing
with 3740 additions and 0 deletions
fileFormatVersion: 2
guid: 7d3e1e95a11e20b4ea5a05903c459fd7
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &7065671909315303190
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7880002779567528406}
- component: {fileID: 4130351463596039582}
m_Layer: 0
m_Name: Applicant
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &7880002779567528406
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7065671909315303190}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 346.90933, y: 236.65599, z: -2.2561636}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &4130351463596039582
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7065671909315303190}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 85e85d2bad375be42b68ca2cfa277bba, type: 3}
m_Name:
m_EditorClassIdentifier:
_output: {fileID: 0}
_agentName:
_userName:
other: {fileID: 0}
fileFormatVersion: 2
guid: e7d3bf08c5ed9514fa7e4b77dc409630
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &6109076178906836865
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4262124013656780945}
- component: {fileID: 315961925804397656}
m_Layer: 0
m_Name: Recruiter
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4262124013656780945
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6109076178906836865}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 346.90933, y: 236.65599, z: -2.2561636}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &315961925804397656
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6109076178906836865}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3e282f5dec0331b49b7b92ae9ac9a81b, type: 3}
m_Name:
m_EditorClassIdentifier:
_output: {fileID: 0}
_agentName:
_userName:
other: {fileID: 0}
fileFormatVersion: 2
guid: d7d34432fa4efc64fb345dae8f821e76
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: dddeca67e65105f4f9098b3a543afeba
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: c899966b06814634aa6d0ecec683328d
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
fileFormatVersion: 2
guid: 9fc0d4010bbf28b4594072e72b8655ab
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 5924e424623e8c54eb0542ebfc1c8d66
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
{
"CurrentProjectSetting": null
}
\ No newline at end of file
File added
{
"ExpandedNodes": [
""
],
"PreviewInSolutionExplorer": false
}
\ No newline at end of file
File added
fileFormatVersion: 2
guid: af28185d37b348642ad17717c4a1e021
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
using TMPro;
using UnityEngine;
public class Applicant : MonoBehaviour, IChatSession
{
[SerializeField] private TextMeshProUGUI _output;
public string _agentName;
public string _userName;
public ChatSession session = null;
public Recruiter other;
// Start is called before the first frame update
void Start()
{}
public void StartSession()
{
var scenario = Resources.Load<TextAsset>("ApplicantScenario").text;
_ = ChatSessionManager.Instance.StartSession(this, _agentName, _userName, scenario);
}
string m = "";
public void Chat(string message)
{
m = message;
ChatSingle();
}
public void ChatSingle()
{
if (session == null)
{
Debug.Log("Session not yet ready or terminated");
return;
}
session.ChatSingle(m);
}
public void EndChatSession()
{
if (session == null)
{
Debug.Log("Session not yet ready or terminated");
return;
}
}
public void OnSessionReady(ChatSession session)
{
this.session = session;
Debug.Log("Applicant session ready");
other.Chat("Hi, my name is " + _agentName + ". I am here for the job interview.");
}
public void OnSessionError(ChatSession session, int _)
{
this.session = null;
}
public void OnChatResponse(ChatSession session, string response)
{
// _output.text = response;
other.Chat(response);
}
public void OnSessionEnd(ChatSession session)
{
session = null;
}
}
fileFormatVersion: 2
guid: 85e85d2bad375be42b68ca2cfa277bba
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
using TMPro;
using UnityEngine;
public class BotChat : MonoBehaviour, IChatSession
{
[SerializeField] public TextMeshProUGUI _input;
[SerializeField] private TextMeshProUGUI _output;
[SerializeField] private string _agentName;
[SerializeField] private string _userName;
ChatSession session = null;
[SerializeField] private BotChat other;
// Start is called before the first frame update
void Start()
{
_ = ChatSessionManager.Instance.StartSession(this, _agentName, _userName);
}
string m = "";
public void Chat(string message)
{
m = message;
ChatSingle();
}
public void ChatSingle()
{
if (session == null)
{
Debug.Log("Session not yet ready or terminated");
return;
}
Debug.Log("Messsage: " + m);
session.ChatSingle(m);
}
public void EndChatSession()
{
if (session == null)
{
Debug.Log("Session not yet ready or terminated");
return;
}
session.EndChatSession();
}
public void OnSessionReady(ChatSession session)
{
this.session = session;
Debug.Log("Session " + session.SessionId + " ready.");
Debug.Log("Other session: " + other.session.SessionId);
if (other.session != null)
{
Debug.Log("Initiating conversation.");
other.Chat("Hi, it's nice to meet you! My name is " + session._agent.Name + "! I'd like to chat about the current eSports landscape a bit! What do you think of games such as counter-strike 2?");
}
}
public void OnChatResponse(string response)
{
_output.text = response;
}
public void OnSessionError(ChatSession session, int _)
{
this.session = null;
}
public void OnChatResponse(ChatSession session, string response)
{
_output.text = response;
other.Chat(response);
}
public void OnSessionEnd(ChatSession session)
{
session = null;
}
}
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