How to add a variable to a prebuilt class?

Hey,

Im trying to make a temp for my particle system and the way im trying is to add a variable to the particlesystem class. If it isn’t possible to edit the class how would I add the temp variable to every particle in the system and access it to change it? This is the script I got right now:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ParticleControl : MonoBehaviour {
    public float RoomTemp = 22;

    ParticleSystem System;
    ParticleSystem.Particle[] Particles;

    private void Update()
    {
        foreach(ParticleSystem.Particle num in Particles)
        {
            
        }
    }
}

If anyone can help me ill appreciate it.

Obviously you can’t add a new variable to a compiled class, but you can use customData for storing data for every particle.