You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
651 B

2 years ago
using System.Collections;
using UnityEngine;
using Spine.Unity;
using System.Collections.Generic;
namespace Illusion
{
public class SpineOverrideMaterial : MonoBehaviour
{
public Material[] originalMaterial;
public Material[] replacementMaterial;
public SkeletonMemoria skeletonMemoria;
public SkeletonRenderer skeletonRenderer;
void Awake()
{
for (int i = 0; i < originalMaterial.Length && i < replacementMaterial.Length; ++i)
{
skeletonMemoria.CustomMaterialOverride.Add(originalMaterial[i], replacementMaterial[i]);
}
}
}
}