Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dialog-system
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VIA-VR
dialog-system
Commits
4d5521ed
Commit
4d5521ed
authored
1 year ago
by
Samuel Truman
Browse files
Options
Downloads
Patches
Plain Diff
Fixed uuid comparison
parent
f3aeced5
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Packages/de.jmu.ge.dialogsystem/Editor/PackageConfigurator.cs
+4
-2
4 additions, 2 deletions
...ages/de.jmu.ge.dialogsystem/Editor/PackageConfigurator.cs
with
4 additions
and
2 deletions
Packages/de.jmu.ge.dialogsystem/Editor/PackageConfigurator.cs
+
4
−
2
View file @
4d5521ed
using
System
;
using
System.Collections.Generic
;
using
System.IO
;
using
System.Linq
;
...
...
@@ -23,6 +24,7 @@ public static void TestSpawnDialogs() {
public
override
void
Init
()
{
EnsureDirectory
(
"Assets/Settings"
);
EnsureDirectory
(
"Assets/Resources"
);
// ArticyEditor.ImportArticyExport();
if
(!
File
.
Exists
(
"Assets/Settings/BuildSettings.json"
))
return
;
File
.
Copy
(
"Assets/Settings/BuildSettings.json"
,
"Assets/Resources/BuildSettings.json"
,
true
);
}
...
...
@@ -32,11 +34,11 @@ public override void OnConfigureScene() {
LoadBuildSettings
(
out
var
buildSettings
);
List
<
AvatarData
>
avatars
=
buildSettings
?[
"avatars"
]?.
ToObject
<
List
<
AvatarData
>>();
if
(
avatars
==
null
||
avatars
.
Count
==
0
)
return
;
var
allUuids
=
Object
.
FindObjectsOfType
<
Uuid
>();
var
allUuids
=
Game
Object
.
FindObjectsOfType
<
Uuid
>();
// spawn dialog prefab for each avatar
foreach
(
var
avatar
in
avatars
)
{
var
avatarObj
=
allUuids
.
FirstOrDefault
(
id
=>
avatar
.
sceneObject
==
id
.
serializedUuid
)?.
gameObject
;
var
avatarObj
=
allUuids
.
FirstOrDefault
(
id
=>
string
.
Equals
(
avatar
.
sceneObject
,
id
.
serializedUuid
,
StringComparison
.
CurrentCultureIgnoreCase
)
)?.
gameObject
;
if
(
avatarObj
==
null
)
continue
;
var
dialogObj
=
PrefabUtility
.
InstantiatePrefab
(
dialogPrefab
)
as
GameObject
;
dialogObj
.
transform
.
SetParent
(
avatarObj
.
transform
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment