What do i have to do about this?,

using System.Collections.Generic;

public class Click : MonoBehaviour {

public object Instance;
public UnityEngine.UI.Text BPC;
public UnityEngine.UI.Text BoxesDisplay;
public float Boxes = 0f;
public int Boxesperclick = 1;

public object CurrencyConverter { get; private set; }

void Update ()


{
    BoxesDisplay.text = "Boxes: " + CurrencyConverter.Instance.GetCurrencyIntoString(Boxes, false, false);
    BPC.text = CurrencyConverter.Instance.GetCurrencyIntoString(Boxesperclick, false, true) + "Boxes/Click";
}

public void Clicked()
{
    Boxes += Boxesperclick;
}

}
,

You’re doing a lot of strange things here. First of all your main problem (which you stated in your “answer”) is that you named your class “CurrencyConverter” but you also declared an auto-property of type “object” which you also named “CurrencyConverter”. So inside your “Click” class “CurrencyConverter” refers to your property and not to your CurrencyConverter class. It’s not really clear what this property is good for so you may want to just remove it.

The next problem is in your CurrencyConverter class you create a method called “awake”. However this will never be called by Unity as the method has to be named “Awake” (case matters).

Another misleading / misnamed method is “CreateInstance”. It does not create anything. It just assignes / initializes the static instance variable to this instance. So this method name should be refactored and given a proper name.

Finally i don’t see any reason why your CurrencyConverter class should be a MonoBehaviour and moreover why it actually should be a singleton. The only useful method “GetCurrencyIntoString” is actually a pure function so it can / should be simply a static method.

Instance is not working, it says object does not contain a defination

This is connected with this:

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

public class CurrencyConverter : MonoBehaviour
{
private static CurrencyConverter instance;
public static CurrencyConverter Instance
{
get
{

        return instance;
    }
}

void awake()
{
    CreateIntance();
}

void CreateIntance()
{
    if (instance == null)
    {
        instance = this;
    }
}

public string GetCurrencyIntoString(float valueToConvert, bool currencyPerSec, bool currencyPerClick)
{
    string converted;
    if (valueToConvert >= 1000000)
    {
        converted = (valueToConvert / 1000000f).ToString("F3") + " M";
    }
    else if (valueToConvert >= 1000)
    {
        converted = (valueToConvert / 1000f).ToString("F3") + " K";
    }
    else
    {
        converted = "" + valueToConvert;
    }

    if (currencyPerSec == true)
    {
        converted = converted + " BPS ";
    }

    if (currencyPerClick == true)
    {
        converted = converted + " BPC";

    }
    return converted;
}

}