Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
MIRAGE-XR
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
244
Issues
244
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
You need help for something ? Go to
https://xr4dev.pages.xr4all.eu
Open sidebar
WEKIT ECS
MIRAGE-XR
Commits
aa7951d4
Commit
aa7951d4
authored
Dec 16, 2021
by
aradjafari
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
invoke function is removed
parent
6d0044c9
Pipeline
#3613
failed with stages
in 36 seconds
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
12 deletions
+24
-12
Assets/MirageXR/Player/Scripts/Character Aug/CharacterController.cs
...ageXR/Player/Scripts/Character Aug/CharacterController.cs
+8
-8
Assets/MirageXR/Player/Scripts/Character Aug/Destination.cs
Assets/MirageXR/Player/Scripts/Character Aug/Destination.cs
+1
-1
Assets/MirageXR/Player/Scripts/Character Aug/DialogRecorder.cs
...s/MirageXR/Player/Scripts/Character Aug/DialogRecorder.cs
+15
-3
No files found.
Assets/MirageXR/Player/Scripts/Character Aug/CharacterController.cs
View file @
aa7951d4
...
...
@@ -32,7 +32,7 @@ namespace MirageXR
//Animation variables
private
bool
animationClipPlaying
;
private
bool
animationPlayedOnce
;
public
bool
c
haracterParsed
{
public
bool
C
haracterParsed
{
get
;
private
set
;
}
...
...
@@ -251,7 +251,7 @@ namespace MirageXR
//wait for the character be setup by using JSON data
await
ActivateCharacterOnEnable
();
c
haracterParsed
=
true
;
C
haracterParsed
=
true
;
//Remove animation clips which not exist for this character from the drobdown list
for
(
int
i
=
animationMenu
.
options
.
Count
-
1
;
i
>
0
;
i
--)
...
...
@@ -329,7 +329,7 @@ namespace MirageXR
triggerDuration
=
DialogRecorder
.
DialogLength
()
>=
animationLength
?
DialogRecorder
.
DialogLength
()
:
animationLength
;
if
(!
_anim
||
!
_agent
||
MovementType
==
string
.
Empty
||
!
c
haracterParsed
)
return
;
if
(!
_anim
||
!
_agent
||
MovementType
==
string
.
Empty
||
!
C
haracterParsed
)
return
;
//Deactivate the animation selector if movement is follow path and loop is on
animationMenu
.
interactable
=
!(
AgentReturnAtTheEnd
&&
!
movementManger
.
FollowPlayer
.
isOn
);
...
...
@@ -366,7 +366,7 @@ namespace MirageXR
private
void
AddWatsonAssistant
()
{
if
(
AIActivated
&&
c
haracterParsed
)
return
;
if
(
AIActivated
&&
C
haracterParsed
)
return
;
//stop dialog recording before activating AI
if
(
DialogRecorder
.
isRecording
)
...
...
@@ -425,7 +425,7 @@ namespace MirageXR
private
void
OnTriggerValueChanged
()
{
if
(!
c
haracterParsed
)
return
;
if
(!
C
haracterParsed
)
return
;
if
(
_characterSetting
.
Trigger
.
isOn
)
{
...
...
@@ -584,7 +584,7 @@ namespace MirageXR
public
void
SaveJson
()
{
if
(
_myObj
==
null
||
string
.
IsNullOrEmpty
(
_myObj
.
poi
)
||
!
c
haracterParsed
)
return
;
//only if the character is instantiated not the prefab
if
(
_myObj
==
null
||
string
.
IsNullOrEmpty
(
_myObj
.
poi
)
||
!
C
haracterParsed
)
return
;
//only if the character is instantiated not the prefab
var
character
=
new
Character
();
...
...
@@ -827,7 +827,7 @@ namespace MirageXR
private
void
OnAnimationLoopToggle
()
{
if
(!
c
haracterParsed
)
return
;
if
(!
C
haracterParsed
)
return
;
if
(
_characterSetting
.
AnimationLoopToggle
.
isOn
)
animationClipPlaying
=
false
;
AnimationLoop
=
_characterSetting
.
AnimationLoopToggle
.
isOn
;
...
...
@@ -835,7 +835,7 @@ namespace MirageXR
private
void
OnAnimationClipChanged
()
{
if
(!
c
haracterParsed
)
return
;
if
(!
C
haracterParsed
)
return
;
StartCoroutine
(
OnImageDisplayIntro
(
true
));
animationClipPlaying
=
false
;
...
...
Assets/MirageXR/Player/Scripts/Character Aug/Destination.cs
View file @
aa7951d4
...
...
@@ -110,7 +110,7 @@ namespace MirageXR
private
void
FixedUpdate
()
{
if
(!
MyCharacter
||
!
MyCharacter
.
c
haracterParsed
)
return
;
if
(!
MyCharacter
||
!
MyCharacter
.
C
haracterParsed
)
return
;
if
(
MyCharacter
.
AnyNodeMoving
)
AvoidSpatialCover
();
...
...
Assets/MirageXR/Player/Scripts/Character Aug/DialogRecorder.cs
View file @
aa7951d4
using
System.IO
;
using
UnityEngine
;
using
UnityEngine.UI
;
using
System.Collections
;
namespace
MirageXR
{
...
...
@@ -37,9 +38,14 @@ namespace MirageXR
bool
isPlaying
;
public
bool
isRecording
{
get
;
private
set
;
}
private
void
Start
()
private
IEnumerator
Start
()
{
Invoke
(
nameof
(
Init
),
500
);
while
(!
MyCharacter
.
CharacterParsed
)
{
yield
return
null
;
}
Init
();
SetEditorState
(
ActivityManager
.
Instance
.
EditModeActive
);
}
...
...
@@ -48,16 +54,22 @@ namespace MirageXR
get
;
set
;
}
private
async
void
Init
()
{
DialogSaveName
=
$"characterinfo/
{
ActivityManager
.
Instance
.
ActiveActionId
}
_
{
MyCharacter
.
MyToggleObject
().
poi
}
.wav"
;
//For character who has lipsync the audio source is added to the object with ThreeLSControl component
var
threeLSControl
=
MyCharacter
.
GetComponentInChildren
<
ThreeLSControl
>();
if
(
threeLSControl
)
if
(
threeLSControl
)
{
_audioSource
=
threeLSControl
.
GetComponent
<
AudioSource
>();
}
else
{
_audioSource
=
MyCharacter
.
GetComponent
<
AudioSource
>();
}
MyCharacter
.
GetComponent
<
CharacterController
>().
AudioEditorCheck
();
_audioEditor
=
MyCharacter
.
MyAudioEditor
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment