when i start the sampleNFT -an already made example from ARToolkit- in unity Editor -pressing play button- it worked greatly
BUT when i build my android app it removes my NFT marker which is in this case "gilbratar"
and i made the player setting and Android manifest as good as it supposed to be !
BTW i'm using Unity 5.3.0f4 and ARToolkit 5.3.1
why i have this problem ?!
check this image for more info
You're posting Unity editor logs, but saying you're building to Android. Do you mean you're trying to hit the "Play" button while your build target is set to Android?
If that is the case, I would recommend continuing on the editor set to your desktop platform for debugging purposes, and only switching over to your build target for building.
Also, make sure that the AndroidManifest.xml in your Assets/Plugins/Android folder has it's package name changed from "com.Artoolkit.demo" to whatever you chose as your Bundle Identifier under build settings for Android.
Related
I am trying to implement License verification into my android unity game. I found this plugin, but the problem is that I am doing this for the first time and don't really know what to do.
I imported that into my project and attached CheckLVLButton.cs
to a gameObject in my scene and inserted my public LVL key to the script.
I have even recompiled the Java source and attached the new classes_jar.txt to the CheckLVLButton script, but I am still getting this error. This is the output of the log
And when I try to debug it on Android using Visual Studio, there is an error that ServiceBinder is null.
But when I try to run the game and push that button it just says Invalid LVL key! Check the source... But I have it right.
Do I have to do something else?
Do I have to install it from google play beta test instead of building apk with unity and installing?
You have to put it up in a test track, install it from the Playstore, and then test it. (it's a pain, and I am still not there yet.)
The reason that it is saying that it is invalid is because it's not installed from the playstore.
Since I want to add Firebase to my Android Game I want to include Google Auth. But I have the following Problem. I need to add some Code to the build.gradle File but I cant find it in my Unity Project.
Here is the manual I found from Firebase : https://firebase.google.com/docs/auth/android/google-signin
I searched on all my Drives for build.gradle but found nothing.
Can you tell me where I find it or what do I have to do to implement the Code from the Link?
To use Gradle in Unity.
1.Go to <UnityInstallationDirecory>\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\GradleTemplates, then copy mainTemplate.gradle file to your <ProjectName>Assets\Plugins\Android folder.
2.You can then modify mainTemplate.gradle to be whatever you want it to be. Now, to make sure the build uses the gradle file, change the Build System to "Gradle (New)".
From Unity v2018.3 onwards, you can add your own custom Gradle build file by simply enabling the Custom Gradle Template property on the Player window
(which can be accessed by File > Build Settings > Player Settings > Publishing settings).
This generates a default mainTemplate.gradle file for you, which you can edit.
It will be in the location: Assets/Plugins/Android/mainTemplate.gradle
Source: https://docs.unity3d.com/Manual/android-gradle-overview.html
I have created asset bundle with this script
using UnityEditor;
public class CreateAssetBundles
{
[MenuItem("Assets/Build AssetBundles")]
static void BuildAllAssetBundles()
{
BuildPipeline.BuildAssetBundles("Assets/AssetBundles/Images", BuildAssetBundleOptions.None, BuildTarget.StandaloneWindows64);
}
}
But when I try to open my exe it says
The file can not be loaded because it was created for another build target that is not compatible with this platform.
Please make sure to build AssetBundles using the build target platform that it is used by.
File's Build target is: 9
I also tried
BuildTarget.StandaloneWindows
And it does not work too.
So why it could happen and how to fix it?
Please make sure to build AssetBundles using the build target platform
that it is used by. File's Build target is: 9.
According to Unity's documentation, Build target 9 is for iOS. You are either in iOS mode or BuildTarget.StandaloneWindows64 is not actually building the AssetBundle for WinStandalone. Unfortunately, you mentioned that you switched Platform and the problem but that didn't solve the problem.
Make sure that your Platform is set to Windows Standalone Build.
Go to File -> Build Settings -> select PC,Mac & Linux Standalone then click Switch Platform. Rebuild it again.
Now, replace:
BuildPipeline.BuildAssetBundles("Assets/AssetBundles/Images", BuildAssetBundleOptions.None, BuildTarget.StandaloneWindows64);
with
BuildPipeline.BuildAssetBundles("Assets/AssetBundles/Images", BuildAssetBundleOptions.None, EditorUserBuildSettings.activeBuildTarget);
Build the AssetBundle again.
Using EditorUserBuildSettings.activeBuildTarget will force Unity to build the AssetBundle with the current active platform.
I download the bundle with
WWW.LoadFromCacheOrDownload(path, 1);
So, as you already understand, it uses the same cache for different platforms, that's why I get iOS bundle for Windows build (because before this I tested it with iOS platform, ahahahah)
Problem: I am unable build and Run from Unity editor, or attach Monodevelop to a device process.
Specific Versions:
Unity5.2.2f
Xcode 7.1 (7B91b)
I believe this all has to do with compatibility as Unity will spit out the small warning, when you Build and Run from the editor:
Unity xcode plugin has not current Xcode in its compatibility list.
Please launch the project manually
UnityEditor.HostView:OnGUI()
Where can I find said "Xcode compatibility list"?
Workaround for whenever in the future this might happen again:
Open Applications in Finder
right-click XCode app > Show package contents
open Contents
open Info.plist
copy the DVTPluginCompatibilityUUID string
In the Finder window, press ⇧⌘G (Shift+cmd+G)
Enter /Applications/Unity/PlaybackEngines/iOSSupport/Tools/OSX/Unity4XC.xcplugin/Contents
open Info.plist in your favorite text editor
find the part with:
<key\>DVTPlugInCompatibilityUUIDs</key>
<array>
<string>63FC1C47-140D-42B0-BB4D-A10B2D225574</string>
<string>37B30044-3B14-46BA-ABAA-F01000C27B63</string>
<string> etc...
add a line with:
<string>[Paste the copied UUID here]</string>
before this line: </array>
Save the file, and provide your password to overwrite the plist.
You'll be able to have Unity run the build process in XCode again (after restarting XCode)
I am trying to load a font into my game for iPhone. I am using C# and MonoTouch and the excellent MonoGame project (I have got the latest build from the develop3d branch on github).
My fonts load correctly on Windows but when I try to run the game on iPhone I get an error saying could not load font. I have loaded the sprite font into a MonoGame content project and compiled for iOS.
I have imported the produced xnb file in as content, set it to content mode in properties and marked it as copy if newer. However it still won't load. After a lot of digging I found that iOS does not support DXT compressed fonts which is apparently what a SpriteFont is.
I have no idea as to how to go about loading the font into my game. Can someone please help with some code as to how to do it?
I have just figured it out. For those who are struggling with the same thing follow these steps:
Create a new solution choose the mono game content for all platforms (which is basically a dummy game for building content)
Add a new mono game content builder project
Set the build type to the type you want e.g. iOS
Add the content you want
In the property window for each content file change the content processor, to the mono game version of the content you are building. e.g. for a texture choose "MonoGame - texture"
Build the solution which will build the content into a folder for the platform you have built for in the release directory
Add the content into your game project from the built folder of the content project. Make sure you set the build action to content and the copy to output directory to copy if newer (or copy always doesnt really matter)
Use the content using the normal content loader in xna