File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed
Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -153,3 +153,36 @@ Before reimporting you can check if an asset supports it:
153153if asset002.asset_can_reimport():
154154 asset002.asset_reimport()
155155```
156+
157+ Creating Assets
158+ -
159+
160+ You can create new asset manually or via a factory (if required):
161+
162+ ``` py
163+ from unreal_engine.classes import ParticleSystem, Material
164+
165+ particle_system = ParticleSystem()
166+ particle_system.set_name(' ParticleSystemForDummies' )
167+
168+ # special form of the constructor taking the object name
169+ material = Material(' FunnyMaterial' )
170+
171+ # this will save particle_system into /Game/Particles.ParticleSystemForDummies
172+ particle_system.save_package(' /Game/Particles' )
173+
174+ # this will save material into /Game/FunnyMaterials.FunnyMaterial
175+ material.save_package(' /Game/FunnyMaterials' )
176+ ```
177+
178+ the previous approach is the blessed one where each asset is stored in a different package.
179+
180+ If you want to store multiple assets in the same package you can simply pass the same name in save_package
181+
182+ ``` py
183+ # this will save particle_system into /Game/Funny.ParticleSystemForDummies
184+ particle_system.save_package(' /Game/Funny' )
185+
186+ # this will save material into /Game/Funny.FunnyMaterial
187+ material.save_package(' /Game/Funny' )
188+ ```
You can’t perform that action at this time.
0 commit comments