private void Start() { m_FpsNextPeriod = Time.realtimeSinceStartup + fpsMeasurePeriod; m_Text = GetComponent <Text>(); m_Particles = GameObject.FindObjectOfType <SplatterParticleProvider>(); m_ShowNumParticles = m_Particles != null; }
void Awake() { splatterBranchPrefab = (GameObject)Resources.Load("MeshSplatterBranch"); if (splatterBranchPrefab == null) { Debug.LogError("[SPLATTER SYSTEM] Can't find SplatterBranch prefab"); enabled = false; return; } particles = gameObject.GetComponentInChildren <SplatterParticleProvider>(); if (particles == null) { Debug.LogError("[SPLATTER SYSTEM] Can't find SplatterParticleProvider"); enabled = false; return; } if (defaultSettings != null) { particles.Configure(defaultSettings); } }
override public void SetParticleProvider(MonoBehaviour particleProvider) { particles = (SplatterParticleProvider)particleProvider; }