i want to create a material and material instance of that material using python in unreal engine.
From the unreal engine python doc i got this:
This is the ‘raw’ way for creating a Material
from unreal_engine.classes import Material
new_material = Material()
new_material.set_name('New Funny Material')
new_material.save_package('/Game/Materials/NewFunnyMaterial')
Even better, you can use the MaterialFactoryNew class
from unreal_engine.classes import MaterialFactoryNew
import unreal_engine as ue
factory = MaterialFactoryNew()
new_material = factory.factory_create_new('/Game/Materials/NewFunnyMaterial')
#destroy the asset
ue.delete_asset(new_material.get_path_name())
But they do not working. thanks in advance.