How to control the param "Speed Scale" in code?

How to control the param “Speed Scale” in code?[71575-qq图片20160606135803.png|71575]

Not sure what you mean, but if you are asking about how the NetworkManager works I suggest you read the documentation: https://docs.unity3d.com/Manual/UNetManager.html My questions and answer is a specific bug related to it.

1 Answer

1

Sorry for the slow reply, meant to pick this up the other day but forgot when I got home!

using UnityEngine;
using System.Collections;


public class SpeedScaleMe : MonoBehaviour {

	public ParticleSystemRenderer myPart;

	void Start () {
		myPart.velocityScale = 0.5f;
	}
}

Just drag your ParticleSystem (that holds the renderer you want to reference) onto the public slot on that script. It makes sense to put the script on the system it’s affecting as well.