Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save walterpalladino/e6b4c744c821524867ce05a8ebf1b6c5 to your computer and use it in GitHub Desktop.
Save walterpalladino/e6b4c744c821524867ce05a8ebf1b6c5 to your computer and use it in GitHub Desktop.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MonoObject : MonoBehaviour
{
private PureClass pc;
// Start is called before the first frame update
void Start()
{
pc = new PureClass("String Prop", 1.75f);
}
// Update is called once per frame
void Update()
{
Debug.Log("Check Pure Class data : " + pc.attrString + " / " + pc.attrFloat );
}
}
using System.Collections;
using System.Collections.Generic;
public class PureClass
{
public string attrString;
public float attrFloat;
public PureClass(string paramString, float paramFloat) {
attrString = paramString;
attrFloat = paramFloat;
}
}
@walterpalladino
Copy link
Author

This is just a test related to creating pure C# classes passing parameters on constructor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment