Custom Plugins in Engine
1. Add a Custom Plugin:
Edit --- Plugins --- +Add --- New Plugins --- Blueprint Library
name it ShaderPathPlugin
2. Editing Plugin:
Open ShaderPathPlugin.cpp, ShaderPathPlugin.h, ShaderPathPlugin.Build.cs inside VS2022, input as following code:3. Folder and File:
Create folder called "Shaders" directly under Project (not Content)
Open VS Code, create a text file for debug and save it under Shaders as test.usf file4. Rebuild:
Close UE5 and rebuild solution in VS2022. Open UE5 after compiling.
5. Test on Material:Add custom node on a new created material.
Add index under Include File Paths and input /Project/Shaders/test.usf
input return green(); for testing
(Output Type needs to be modified according to the return value type of the function that returning. For example, if the function returns float, the output type should be CMOT floating-point 1. Here green() returns half3, so it should be CMOT floating-point 3.


No comments:
Post a Comment