Last active
November 30, 2018 06:49
-
-
Save Makizemi/a72370c4ae4516aad1e9704ec3434a14 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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