GameObject Target { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The Target property of the ParticleAttractor class specifies the GameObject that particles will be attracted to. This property is essential for defining the focal point of the particle attraction effect within the scene.

Usage

To use the Target property, assign it a GameObject instance that you want the particles to be attracted to. This can be any object within your scene that is represented by a GameObject.

Example

// Create a new ParticleAttractor instance
ParticleAttractor attractor = new ParticleAttractor();

// Assign a GameObject to the Target property
attractor.Target = someGameObject;

// Now particles will be attracted to 'someGameObject'