public void AddTargetedLight() { var newLightTarget = gameObject.AddComponent <LightTarget>(); newLightTarget.hideFlags = HideFlags.HideInInspector; var newLightTargetParameters = new LightTargetParameters(); newLightTarget.lightTargetParameters = newLightTargetParameters; lightTargetList.Add(newLightTarget); lightTargetParametersList.Add(newLightTargetParameters); }
public LightRigPreset SaveLightRigProperties() { var newPreset = ScriptableObject.CreateInstance <LightRigPreset>(); newPreset.lightTargetParametersList = new List <LightTargetParameters>(); //newPreset.lightTargetParametersList = var temp = new LightTargetParameters[lightTargetParametersList.Count]; lightTargetParametersList.CopyTo(temp); newPreset.lightTargetParametersList = temp.ToList(); return(newPreset); }