Added PSXMesh, deindexes tris, converts them into primitives for the PSX
This commit is contained in:
@@ -9,6 +9,9 @@ namespace PSXSplash.RuntimeCode
|
||||
[HideInInspector]
|
||||
public PSXTexture2D Texture;
|
||||
|
||||
[HideInInspector]
|
||||
public PSXMesh Mesh;
|
||||
|
||||
public void CreatePSXTexture2D()
|
||||
{
|
||||
Renderer renderer = GetComponent<Renderer>();
|
||||
@@ -18,6 +21,15 @@ namespace PSXSplash.RuntimeCode
|
||||
Texture.OriginalTexture = texture;
|
||||
}
|
||||
}
|
||||
|
||||
public void CreatePSXMesh()
|
||||
{
|
||||
MeshFilter meshFilter = gameObject.GetComponent<MeshFilter>();
|
||||
if (meshFilter != null)
|
||||
{
|
||||
Mesh = PSXMesh.CreateFromUnityMesh(meshFilter.mesh, Texture.Width, Texture.Height);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user