Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FrameWorld
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
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
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FrameIT
FrameWorld
Commits
523dbf1c
Commit
523dbf1c
authored
11 months ago
by
Paul-Walcher
Browse files
Options
Downloads
Plain Diff
Merge branch 'Paul_Marius' of
https://gl.mathhub.info/FrameIT/frameworld
into Paul_Marius
parents
6dae533d
25263a7a
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
DOC/create_fact.md
+16
-14
16 additions, 14 deletions
DOC/create_fact.md
with
16 additions
and
14 deletions
DOC/create_fact.md
+
16
−
14
View file @
523dbf1c
...
...
@@ -12,14 +12,14 @@
1. A constructor that calls base(). Constructor can have SomDoc, which is the MMT URI as OMS.
2. define: A method parseFact(List<Fact>, MMTFact fact).
MMTFact is the fact you received from the server.
Then, in this method, you will try to add your fact to the ParsingDictionary in Assets\InteractionEngine\FactHandling\Facts,
then add it to the first argument (the list).
2. define: A method parseFact(List<Fact>
ret
, MMTFact fact).
convert MMTFact fact to Unity Fact and add it to the List<Fact> ret
hint: use FactRecorder.AllFacts[<uri>] to get the Unity Fact belonging to the <uri>
3. define: public override bool HasDependentFact => [true/false]
4. define: GetDeendentFactIds(), which gives back a string array of the dependent I
d
s of your facts.
4. define: GetDeendentFactIds(), which gives back a string array of the dependent
UR
Is of your facts.
5. define: GetHashCode()
...
...
@@ -32,24 +32,26 @@
8. define: MakeMMTDecalaration(), which gives back a new MMTFact.
9. define: Defines(), which gives back a SOMDoc(MMTObject) of your class
<br>
2.
Add the MMT-fact you Implemented into Assets
\S
cripts
\M
MTServer
\C
ommunicationProtocol
\M
MTConstants.cs
<br>
3.
Then, in Assets
\S
cripts
\I
nteractionEngine
\F
actHandling
\F
acts
\F
act.cs
<br>
1.
add an entry into ParsingDictionary.parseFactDictionary with your MMTConstant as key and the parseFact Method of the Fact class you implemented.
2.
Then add a line to the lines that look like [JsonSubtypes,.KnownSubType(typeof(YOUR_FACTCLASS), nameof(YOUR_FACTCLASS))]
<br>
2. Then add a line to the lines that look like
[JsonSubtypes,.KnownSubType(typeof(YOUR_FACTCLASS), nameof(YOUR_FACTCLASS))]
4.
In Assets
\S
cripts
\I
nteractionEngine
\F
actHandling
\F
actSpawner.cs
<br>
1. Add a variable of type GameObject for your fact.
2. Create a spawn method for your fact.
3. In SpawnFactRepresentation add your Fact to the switch-case statement
<br>
5.
In the Unity Editor in Assets
\R
essources
\P
refabs
\F
acts create the prefab for your Fact.
<br>
6.
Connect your Prefab to the FactSpawner class
<br>
1. Open Assets\Scenes\Worlds\RiverWorld.
2. In the Unity Project Tab goto folder Assets\Scripts\InteractionEngine\FactHandling
3. Rightclick FactSpawner.cs and select "Find References In Scene".
...
...
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