How to detect more than one click

I would like to save what the player have click. I managed to do it but however, player could click on the same object more than once and i will have duplicate copy when i save the thing. It is possible to remove the duplicate??

function SetSelectedRadical0(temp : GameObject)
	selected_0 = temp;

	dis_selected_0.guiText.text = selected_0.GetComponent(textOnMouse0).thisRadical.Ctext;

You can iterate an array with Distinct() using System.Linq.

using System.Linq;

function StripDuplicates () {
    yourArray = yourArray.Distinct();

You could also use booleans for each selectable object, if it’s already true then it can’t be cached by any other variable.

If you use Js you can try this one:

yourList = Enumerable.ToList(Enumerable.Distinct(yourList));