Skip to content

Instantly share code, notes, and snippets.

@Makizemi
Last active November 30, 2018 06:49
Show Gist options
  • Save Makizemi/a72370c4ae4516aad1e9704ec3434a14 to your computer and use it in GitHub Desktop.
Save Makizemi/a72370c4ae4516aad1e9704ec3434a14 to your computer and use it in GitHub Desktop.
using UnityEngine;
public class FXAttributeChanger : MonoBehaviour
{
PKFxFX fx;
void Start()
{
fx = GetComponent<PKFxFX>();
}
void Update()
{
//パターン1
PKFxManager.Attribute attribute;
attribute = new PKFxManager.Attribute("HogeAttribute", 0.5f);
fx.SetAttribute(attribute);
//パターン2
var hogeAttribute = fx.GetAttribute("HogeHoge");
hogeAttribute.m_Value0 = 1.0f;
hogeAttribute.m_Value1 = 0.2f;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment