ImportPlayerMesh

From Onset Developer Wiki
Revision as of 09:14, 14 April 2020 by BlueMountains (talk | contribs) (Created page with "This video shows how to import player model meshes in Onset. It works for clothing items as well. The mesh must be assigned the UE4_Mannequin_Skeleton. https://www.youtube.co...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This video shows how to import player model meshes in Onset. It works for clothing items as well. The mesh must be assigned the UE4_Mannequin_Skeleton.

https://www.youtube.com/watch?v=nM8FQLYzX-c

function OnPackageStart()
	LoadPak("CharMod", "/CharMod/", "../../../OnsetModding/Plugins/CharMod/Content/")
end
AddEvent("OnPackageStart", OnPackageStart)

AddEvent("OnKeyPress", function(k)
	if k == "1" then
		    local SkeletalMeshComponent = GetPlayerSkeletalMeshComponent(GetPlayerId(), "Body")
		    SkeletalMeshComponent:SetSkeletalMesh(USkeletalMesh.LoadFromAsset("/CharMod/SK_Mannequin"))
    end
end)