|
what is that not working. I attached this script on my sprite created by SM2
var speed : float = 0.01; var updown : float = 0.01; var sprite : PackedSprite = GameObject.GetComponent("PackedSprite"); function Update () {
(comments are locked)
|
|
SM2 works with JavaScript, but you have to make sure the SM2 files are where they are put when you originally import the package. That is, all the scripts are grouped under the "Plugins" folder. Also, make sure your own JS scripts which call SM2 aren't inside one of the other "priority" folders like Plugins, Standard Assets, etc. If they are, then it defeats the purpose of having the "Plugins" folder, which makes sure the C# gets compiled before the JS. If you do that, all should be well.
(comments are locked)
|
|
Hi Lesfundi, Can you double check that you have correctly install SM2? you should have it in your Plugins folder. If not follow the instructions given when you purchased SM2, and you should have the PackedSprite.cs file under Plugins/Sprite scripts/ in your Project view. It could also be a problem with this script and where it is in your project, since PackedSprite is a cs file and your script is in js, there are some considerations to be aware of. Try to write this script in cs and see if it pass. check this for full explanation: http://unity3d.com/support/documentation/ScriptReference/index.Script_compilation_28Advanced29.html Hope it helps, Jean
(comments are locked)
|
|
indeed. It was in cs but not in Java. So, SM2 only works with cs?
(comments are locked)
|
