Hello guys!
I’m curious about something.
Let’s say I have a class like this
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class MeshData {
public List<Vector3> vertices = new List<Vector3>();
public List<int> triangles = new List<int>();
public List<Vector2> uv = new List<Vector2>();
public List<Vector3> colVertices = new List<Vector3>();
public List<int> colTriangles = new List<int>();
public MeshData() {
}
}
A MeshData Object has to be passed multiple times across multiple methods for one chunk to fill the needed information for this MeshData.
Does it make sense to use ref or out instead of the normal call by value and then returning the modified MeshData?
Thanks!