Skip to content

Commit

Permalink
Update document
Browse files Browse the repository at this point in the history
  • Loading branch information
AkiKurisu committed Feb 26, 2025
1 parent fc62116 commit e0a37c8
Show file tree
Hide file tree
Showing 5 changed files with 304 additions and 5 deletions.
Binary file added Docs/Images/flow_custom_function_config.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
140 changes: 140 additions & 0 deletions Docs/Images/flow_custom_function_config.png.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added Docs/Images/flow_custom_function_drag.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
140 changes: 140 additions & 0 deletions Docs/Images/flow_custom_function_drag.png.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 24 additions & 5 deletions Docs/flow_startup.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Flow
Powerful visual scripting solution inspired from Unreal's Blueprint.

- [Flow](#flow)
- [Conecpt](#conecpt)
- [Events](#events)
- [Functions](#functions)
Expand All @@ -24,8 +25,9 @@ Powerful visual scripting solution inspired from Unreal's Blueprint.
- [Port Implict Conversation](#port-implict-conversation)
- [Node has Port Array](#node-has-port-array)
- [Generic Node](#generic-node)
- [Custom Function](#custom-function)
- [Code Generation](#code-generation)
- [ILPP](#ilpp)
- [IL Post Process](#il-post-process)
- [Source Generator](#source-generator)
- [Debug](#debug)
- [Use Breakpoint](#use-breakpoint)
Expand Down Expand Up @@ -482,6 +484,7 @@ public class FlowNode_Sequence : ForwardNode, ISerializationCallbackReceiver, IP
```

## Generic Node

Generic nodes define type restrictions through template classes, so that argument
types can be obtained in the editor and the generic node instance can be constructed
at runtime. This helps reduce lines of code.
Expand Down Expand Up @@ -557,16 +560,32 @@ public class FlowNode_CastT_Template: GenericNodeTemplate
}
```

## Custom Function

You can define function subGraph inside your flow graph to reuse logic.

You can create a custom function by following these steps:

1. Click blackboard `+` button and select `Function` in menu which will let you open subGraph view.
2. Configure the function input and output parameters.

![Configure Input](./Images/flow_custom_function_config.png)

3. Save your function subGraph.
4. Enter uber graph and drag the function from blackboard to graph.

![Drag Function](./Images/flow_custom_function_drag.png)

5. You can modify the name of custom function just like modifing a variable.

# Code Generation

The following are some details about the code generation technology used in Flow,
which may help you understand the principles.

## ILPP

`ImplementableEvent` let user implement custom event and invoke them in code.
## IL Post Process

By default, ILPP will inject bridge method call before your implementation.
IL Post Process (ILPP) will inject IL to execute event into user's [ImplementableEvent](#implementable-event) method body.

Below is the code decompiled using `dnspy`.

Expand Down

0 comments on commit e0a37c8

Please sign in to comment.