You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[The FmvMaker Control Nodes](#control-nodes-fmvmaker)
11
-
-[Using JSON files (the complicated approach)](#complicated-approach)
11
+
-[Using JSON files (the complex approach)](#complex-approach)
12
12
- [How do I build a video JSON list?](#json-basics)
13
13
- [What does a “VideoElement” look like?](#video-element)
14
14
- [Basic structure](#basic-structure-video)
@@ -41,7 +41,7 @@ You can get **FmvMaker** either via the Unity AssetStore (https://assetstore.uni
41
41
42
42
Important for you are the Resources folder (within the **FmvMaker** folder) where you'll be placing your content (videos, images, etc...) as well as your configuration files. The Prefabs folder contains default prefabs, especially for prototyping. In the Scenes folder are demo scenes, to give you an overview of the comprehensive possibilities of **FmvMaker**.
43
43
44
-
If you want to use the demo videos provided by us (Unity doesn't like video files in their AssetStore assets), pls check out the Releases section of this repository. Each release will contain a separate .zip file with the current demo videos in it. See https://github.com/FireDragonGameStudio/FmvMaker/releases for details. For an easier start, we decided to add an online reference for all demo videos. For how to use videos from within your Assets folder, check the [FmvMaker configuration](#fmvMaker-configuration) section.
44
+
If you want to use the demo videos provided by us (Unity doesn't like video files in their AssetStore assets), pls check out the Releases section of this repository. Each release will contain a separate .zip file with the current demo videos in it. See https://github.com/FireDragonGameStudio/FmvMaker/releases for details. For an easier start, we decided to add an online reference for all demo videos. For how to use videos from within your Assets folder, check the [**FmvMaker** configuration](#configuration) section.
45
45
46
46
<aname="simple-approach"></a>
47
47
# Using the visual editor (the simple approach)
@@ -59,7 +59,7 @@ The next chapters will explain how the various nodes work and what they are doin
59
59
### The FmvMaker Nodes
60
60
These nodes are used to control the flow of the graph. Although not every output trigger is needed, we added them in case someone wants to add custom logic or graph elements.
61
61
62
-
All the event nodes can be found under the script graph context menu category **FmvMaker\**.
62
+
All the event nodes can be found under the script graph context menu category **FmvMaker/**.
63
63
64
64
#### Fmv Video Node
65
65
The main node, which handles video playback and creation of the current "state". The **Clickables** property lets the user define how many **Clickables** are within the current screen and is clamped between 0 and 10. Which video should be played is handled by the selection of dropdown, which consists of every video entered in **FmvVideoEnum**.
@@ -70,6 +70,8 @@ On the left upper corner is the **InputTrigger** for receiving the graph flow. O
70
70
71
71
**FmvTargetVideo** either gets the **FmvGraphElementData** from a previous flow node, or an **ItemNode** or a **NagivationNode**.
| Field | Type | Default value | Optional | Description |
82
86
| --- | --- | --- | --- | --- |
83
87
| ClickablesCount | int | 2 || The number of clickables, that are available in the current "state". |
@@ -86,6 +90,8 @@ In general the same node as **FmvVideoNode**, but this video is looping, which m
86
90
#### Fmv Navigation Node
87
91
Used for creating a **Clickable**, which enables a transition between "states". This **Clickable** is NOT an item and can be configured via the graph inspector. The node creates an **FmvGraphElementData**, which can be used as input for e.g. an **FmvVideoNode**.
| Field | Type | Default value | Optional | Description |
90
96
| --- | --- | --- | --- | --- |
91
97
| Name | string | "" || The video element needs a unique name, which is set via the *Name* field. |
@@ -97,6 +103,8 @@ Used for creating a **Clickable**, which enables a transition between "states".
97
103
#### Fmv Item Node
98
104
Again creating a **Clickable**, but this time it's an item, which can be added to the players inventory by clicking on it. Similar to the **FmvNavigationNade** a video is played when picking it up. But in addtion, another video is played, when used in the right "state".
| Field | Type | Default value | Optional | Description |
101
109
| --- | --- | --- | --- | --- |
102
110
| Name | string | "" || The video element needs a unique name, which is set via the *Name* field. |
@@ -109,41 +117,51 @@ Again creating a **Clickable**, but this time it's an item, which can be added t
109
117
#### Fmv Exit State Node
110
118
As we're talking about "states", which are not real states, this node is used to clean up after leaving "states". Originally this was part of **FmvVideoNode** and **FmvLoopVideoNode**, but in order to give users more flexibility, this was implemented as a separte node, which will just be integrated into the graph flow.
All events available via **FmvMaker** can be used via event nodes too. These event nodes are fired, when a connected state triggerd a corresponding event. E.g. if a **FmvNavigationNode****Clickable** is clicked in a "state", all connected **OnFmvNavigationClicked** events are fired. The result of such an event is a **FmvGraphElementData** object, which can be used as input for other **FvmMaker** nodes.
118
130
119
131
The available events are:
120
-
- OnFmvInventoryClicked
121
-
- OnFmvItemPickupClicked
122
-
- OnFmvNavigationClicked
123
-
- OnFmvVideoPaused
124
-
- OnFmvVideoSkipped
125
-
- OnFmvVideoStarted
126
-
- OnFmvVideoFinished
132
+
* OnFmvInventoryClicked
133
+
* OnFmvItemPickupClicked
134
+
* OnFmvNavigationClicked
135
+
* OnFmvVideoPaused
136
+
* OnFmvVideoSkipped
137
+
* OnFmvVideoStarted
138
+
* OnFmvVideoFinished
127
139
128
140
Users can furthermore add custom logic to theses events, without having to use C# code and the **IFmvMakerVideoEvents** interface.
129
141
130
-
All the event nodes can be found under the the script graph context menu category **Events\FmvMaker\**.
142
+
All the event nodes can be found under the the script graph context menu category **Events/FmvMaker/**.
While Unity's VisualScripting already contains a bunch of control nodes, one had to be added for **FmvMaker**, the **SwitchOnFmvVideoEnum**, to enable users check for specific videos, when entering a "state". This switch will always contain ALL videos from **FmvVideoEnum**, but this list can be quite long, so we added 2 index fields, for limiting the available possibilities by only displaying options within a certain range. For this to work property, users must ensure to create the **FmvVideoEnum** in a "chuncked" way, where e.g. videos from chapters are on close positions within the **FmvVideoEnum**.
135
149
136
150
The upper left corner hat the **InputTrigger** for the graph flow. Each switch option is an **OutputTrigger** to pass on the graph flow to the next node. The second input entry, is an **FmvGraphElementData** element to do the selection on. This is usually set via an event node, where the values may vary, depending which "state" you're coming from.
137
151
138
-
All the control nodes can be found under the the script graph context menu category **Control\FmvMaker\**.
152
+
All the control nodes can be found under the the script graph context menu category **Control/FmvMaker/**.
| Field | Type | Default value | Optional | Description |
141
157
| --- | --- | --- | --- | --- |
142
158
| StartIndex | int | 0 || The inclusive start index. |
143
159
| EndIndex | int |**FmvVideoEnum** length || The inclusive end index of all videos in **FmvVideoEnum**. |
144
160
145
-
<aname="complicated-approach"></a>
146
-
# Using JSON files (the complicated approach)
161
+
<br><br>
162
+
163
+
<aname="complex-approach"></a>
164
+
# Using JSON files (the complex approach)
147
165
**VideoData** for FmvMaker is a configuration file stored within its Resources folder (*FmvMaker/Resources/*) and is basically a JSON list of single video elements, which are qualified via their names. This means that there is no complex hierarchy to build, each video element stands for its own. Please always choose simple, but unique names for your video elements. You can compare a video element to some kind of *state*, which will lead to *1 to n* next *states*. The previous *state* doesn't matter at all. Yes, this leads to a long list of elements, but it also helps to keep things simple.
148
166
149
167
The next kind of important data are so called **Clickables**. Information about **Clickables** is also stored within the **FmvMaker** Resources folder in the Unity project (*FmvMaker/Resources/*) in a separate configuration file. These elements stand for triggering actions when clicking on it. It doesn't matter if these actions are e.g. items or the trigger for the next video. The only difference is the item handling, of which a basic version is already included in **FmvMaker** and will be explained in the further sections.
@@ -417,6 +435,7 @@ The new **VideoData** element (DifferentUniqueVideoName) will basically be the s
417
435
{
418
436
"VideoList": [{
419
437
"Name":"UniqueVideoName",
438
+
"VideoTarget":"UniqueVideoName",
420
439
"NavigationTargets": [{
421
440
"Name":"UniqueClickable"
422
441
}, {
@@ -425,18 +444,21 @@ The new **VideoData** element (DifferentUniqueVideoName) will basically be the s
425
444
]
426
445
}, {
427
446
"Name":"NextUniqueVideoName",
447
+
"VideoTarget":"NextUniqueVideoName",
428
448
"NavigationTargets": [{
429
449
"Name":"NextClickable"
430
450
}
431
451
]
432
452
}, {
433
453
"Name":"AnotherUniqueVideoName",
454
+
"VideoTarget":"AnotherUniqueVideoName",
434
455
"NavigationTargets": [{
435
456
"Name":"AnotherClickable"
436
457
}
437
458
]
438
459
}, {
439
460
"Name":"DifferentUniqueVideoName",
461
+
"VideoTarget":"DifferentUniqueVideoName",
440
462
"NavigationTargets": [{
441
463
"Name":"UniqueClickable"
442
464
}, {
@@ -445,6 +467,7 @@ The new **VideoData** element (DifferentUniqueVideoName) will basically be the s
445
467
]
446
468
}, {
447
469
"Name":"UniqueToDifferentVideoName",
470
+
"VideoTarget":"UniqueToDifferentVideoName",
448
471
"NavigationTargets": [{
449
472
"Name":"AnotherClickable"
450
473
}
@@ -505,6 +528,7 @@ Sometimes you want to jump from video element directly to another, without letti
505
528
{
506
529
"VideoList": [{
507
530
"Name":"UniqueVideoName",
531
+
"VideoTarget":"UniqueVideoName",
508
532
"NavigationTargets": [{
509
533
"Name":"UniqueClickable"
510
534
}, {
@@ -513,18 +537,21 @@ Sometimes you want to jump from video element directly to another, without letti
513
537
]
514
538
}, {
515
539
"Name":"NextUniqueVideoName",
540
+
"VideoTarget":"NextUniqueVideoName",
516
541
"NavigationTargets": [{
517
542
"Name":"NextClickable"
518
543
}
519
544
]
520
545
}, {
521
546
"Name":"AnotherUniqueVideoName",
547
+
"VideoTarget":"AnotherUniqueVideoName",
522
548
"NavigationTargets": [{
523
549
"Name":"AnotherClickable"
524
550
}
525
551
]
526
552
}, {
527
553
"Name":"DifferentUniqueVideoName",
554
+
"VideoTarget":"DifferentUniqueVideoName",
528
555
"NavigationTargets": [{
529
556
"Name":"UniqueClickable"
530
557
}, {
@@ -533,6 +560,7 @@ Sometimes you want to jump from video element directly to another, without letti
533
560
]
534
561
}, {
535
562
"Name":"UniqueToDifferentVideoName",
563
+
"VideoTarget":"UniqueToDifferentVideoName",
536
564
"NavigationTargets": [{
537
565
"Name":"InstantAnotherUniqueClickable"
538
566
}
@@ -596,36 +624,42 @@ It often makes sense to have some kind of hub, where the player originates from,
596
624
{
597
625
"VideoList": [{
598
626
"Name":"UniqueVideoName",
627
+
"VideoTarget":"UniqueVideoName",
599
628
"NavigationTargets": [{
600
629
"Name":"InstantUniqueIdleClickable"
601
630
}
602
631
]
603
632
}, {
604
633
"Name":"NextUniqueVideoName",
634
+
"VideoTarget":"NextUniqueVideoName",
605
635
"NavigationTargets": [{
606
636
"Name":"NextClickable"
607
637
}
608
638
]
609
639
}, {
610
640
"Name":"AnotherUniqueVideoName",
641
+
"VideoTarget":"AnotherUniqueVideoName",
611
642
"NavigationTargets": [{
612
643
"Name":"AnotherClickable"
613
644
}
614
645
]
615
646
}, {
616
647
"Name":"DifferentUniqueVideoName",
648
+
"VideoTarget":"DifferentUniqueVideoName",
617
649
"NavigationTargets": [{
618
650
"Name":"InstantUniqueIdleClickable"
619
651
}
620
652
]
621
653
}, {
622
654
"Name":"UniqueToDifferentVideoName",
655
+
"VideoTarget":"UniqueToDifferentVideoName",
623
656
"NavigationTargets": [{
624
657
"Name":"InstantAnotherUniqueClickable"
625
658
}
626
659
]
627
660
}, {
628
661
"Name":"UniqueIdleVideoName",
662
+
"VideoTarget":"UniqueIdleVideoName",
629
663
"IsLooping":true,
630
664
"NavigationTargets": [{
631
665
"Name":"UniqueClickable"
@@ -701,18 +735,21 @@ Create a **Clickable** and a **VideoData** element for every **Item** you'd like
701
735
{
702
736
"VideoList": [{
703
737
"Name":"UniqueVideoName",
738
+
"VideoTarget":"UniqueVideoName",
704
739
"NavigationTargets": [{
705
740
"Name":"InstantUniqueIdleClickable"
706
741
}
707
742
]
708
743
}, {
709
744
"Name":"NextUniqueVideoName",
745
+
"VideoTarget":"NextUniqueVideoName",
710
746
"NavigationTargets": [{
711
747
"Name":"NextClickable"
712
748
}
713
749
]
714
750
}, {
715
751
"Name":"AnotherUniqueVideoName",
752
+
"VideoTarget":"AnotherUniqueVideoName",
716
753
"NavigationTargets": [{
717
754
"Name":"AnotherClickable"
718
755
}
@@ -723,18 +760,21 @@ Create a **Clickable** and a **VideoData** element for every **Item** you'd like
723
760
]
724
761
}, {
725
762
"Name":"DifferentUniqueVideoName",
763
+
"VideoTarget":"DifferentUniqueVideoName",
726
764
"NavigationTargets": [{
727
765
"Name":"InstantUniqueIdleClickable"
728
766
}
729
767
]
730
768
}, {
731
769
"Name":"UniqueToDifferentVideoName",
770
+
"VideoTarget":"UniqueToDifferentVideoName",
732
771
"NavigationTargets": [{
733
772
"Name":"InstantAnotherUniqueClickable"
734
773
}
735
774
]
736
775
}, {
737
776
"Name":"UniqueIdleVideoName",
777
+
"VideoTarget":"UniqueIdleVideoName",
738
778
"IsLooping":true,
739
779
"NavigationTargets": [{
740
780
"Name":"UniqueClickable"
@@ -837,6 +877,7 @@ Create a **Clickable** and a **VideoData** element for every **Item** you'd like
837
877
| P | Pauses/Unpauses the playing video. |
838
878
| Escape | Skips the currently playing video. Note that the videos has to be watched at least once, to be able to skip it. |
839
879
| Q | Quits the game, when running the build. Doesn't stop the Editor from running. |
880
+
| S | Saves game data. Will be loaded automatically if game data is present. |
840
881
| I | Toggles the inventory visibility. |
841
882
842
883
<aname="icons"></a>
@@ -849,6 +890,7 @@ In the previous created FMV prototype, every **NavigationTarget** as well as the
0 commit comments