I've set up a SQLite database with Unity. Into this I would like to add the current CPU Utilisation. The SQLite scripts are in Javascript and the method for finding the CPU utilisation is in a C# script, I have tried changing the javascript to C# but I am not that skilled. Ive tried several methods, each giving me errors:
(http://www.41post.com/1935/programming/unity3d-js-cs-or-cs-js-access)
private var csScript : ClientValues;
function Awake()
{
csScript = this.GetComponent("ClientValues");
}
using this method gives me the error "The name 'ClientValues' does not denote a valid type ('not found')"
and if I use (http://answers.unity3d.com/questions/272122/can-i-pass-a-value-from-a-c-script-into-a-java-scr.html)
var curValue : int;
var gObject2 : GameObject;
function Update()
{
var cSharpScript = gObject2.GetComponent("Clientvalues");
curValue = cSharpScript.myValue;
}
I get the error: 'myValue' is not a member of 'UnityEngine.Component'
Is this something to do with me using Unity 5? What can I do to have the Javascript access the C# value?