Can't import LoveHate into JavaScript code?
Can't import LoveHate into JavaScript code?
I can't seem to import PixelCrushers.LoveHate into a JavaScript file. get;
Namespace 'PixelCrushers.LoveHate' not found, maybe you forgot to add an assembly reference?
error.
Loads into C# files fine though. I just want to keep to JavaScript though. Any way to remedy this?
Thanks
Namespace 'PixelCrushers.LoveHate' not found, maybe you forgot to add an assembly reference?
error.
Loads into C# files fine though. I just want to keep to JavaScript though. Any way to remedy this?
Thanks
Can't import LoveHate into JavaScript code?
Hi,
Put this at the top of your .js file:
If you're going to call C# from UnityScript, remember to move the PixelCrushers folder into Plugins so it gets compiled before your UnityScript.
Put this at the top of your .js file:
Code: Select all
import PixelCrushers.LoveHate;
Last edited by Tony Li on Mon Jun 01, 2015 10:55 am, edited 1 time in total.
Can't import LoveHate into JavaScript code?
Thanks for the quick reply. Though I did have the import up top, which is what confuddled me. Any other strategies?
Thanks
Thanks
Can't import LoveHate into JavaScript code?
I dragged to entire PixelCrushers folder into the Plugins folder which got rid of the error. Thanks for the tip!
Can't import LoveHate into JavaScript code?
Great! If you notice any issues, or have any questions in general about using Love/Hate, don't hesitate to post. I'm finishing up work for the day, but I'll check the forum first thing in the morning.
The new version (1.1) should be available on the Asset Store in a few days, by the way.
The new version (1.1) should be available on the Asset Store in a few days, by the way.
Can't import LoveHate into JavaScript code?
I spoke too soon. Dragging the folders around in Unity caused LoveHate to lose links to all kinds of files. Couldn't savage it and had to restore from backup.
Can't import LoveHate into JavaScript code?
Did you drag in Unity's Project view? If you drag outside of Unity (i.e., in your OS), it'll mess up Unity's metadata.
Can't import LoveHate into JavaScript code?
Yes, in the project view. It lost connections to the FactionDatabase and a couple other scripts it said was missing from the editor folder or other places. I tried moving things around to appease it with no luck, just makings things worse. Back to starting point again.
Can't import LoveHate into JavaScript code?
I'll document where to move each folder and post it here. The Love/Hate scripts are all standard Unity C# scripts, doing nothing unusual under the hood. So the process will be the same as for any typical set of C# scripts. I'm at a conference today, so I won't get a chance to post until the end of the day.
Can't import LoveHate into JavaScript code?
Hi,
Two solutions:
1. If you'll please email your Asset Store invoice number to tony (at) pixelcrushers.com, I'll email you a link to download Love/Hate v1.1. With this version, I created a new Unity 5.0.1f1 project and imported Love/Hate. In the Project view, I created a new folder named "Plugins" and dragged the "Pixel Crushers" folder into it. Everything seems to be fine.
2. Or, to stick with Love/Hate v1.0.2 for now, move "Pixel Crushers" into "Plugins". Then create a folder in Assets named "Editor". Move all the *.cs files from the Editor folders inside Pixel Crushers/LoveHate/Scripts into Assets/Editor. This will be 7 files.
Two solutions:
1. If you'll please email your Asset Store invoice number to tony (at) pixelcrushers.com, I'll email you a link to download Love/Hate v1.1. With this version, I created a new Unity 5.0.1f1 project and imported Love/Hate. In the Project view, I created a new folder named "Plugins" and dragged the "Pixel Crushers" folder into it. Everything seems to be fine.
2. Or, to stick with Love/Hate v1.0.2 for now, move "Pixel Crushers" into "Plugins". Then create a folder in Assets named "Editor". Move all the *.cs files from the Editor folders inside Pixel Crushers/LoveHate/Scripts into Assets/Editor. This will be 7 files.