How can i check if player have to be rebuild? - unity3d

I am using a build pipeline script to build my android application from unity. I'm using addressables bundles too.
All is build with github actions.
I would like to detect if the player has to be rebuilt or just the addressables bundle, and based on that, chose the right option in my script.
I'm using
BuildPipeline.BuildPlayer
and
AddressableAssetSettings.BuildPlayerContent
For addressables.
All works and I just want to fine tune my process.
I have duplicates for addressable catalogs.
2 from player build : catalog_2022.11.05.18.04.45.hash catalog_2022.11.05.18.02.53.hash
and 2 from addressable content build : catalog_2022.11.05.18.02.53.json catalog_2022.11.05.18.04.45.json
A solution could be to change this by script but i don't know what to use in my code to replicate the option in unity visible below.
thanks!

Related

Unity adds extra permissions to manifest file after exporting a project

I am new to unity and I noticed that when exporting a unity project, unity adds extra/unwanted permissions to the android manifest file. We tried to use tools:node="remove" but it didn't help. Currently, we are using double flip build process, but we also trying to avoid using that for long. Preview is set to false in EditorBuildScript.cs
The highlighted part of the image is showing the extra permissions added by unity at build time

What is the "resource file" when building Unity3D project with WebGL and what needs to be considered using the Unity3D WebGL-Build?

I am trying to build a small project with Unity3D and I want to display it locally in my Firefox-Browser.
In my Unity-Editor it looks like this: 1
And if I am building it as WebGL it looks like this:2
The Images which are being displayed in the Browser are imported as .gltf Objects and the green planes are built within the unity-hub. I assumed that it may be because of the lightning and so I tried including a PointLight, but that did not work.
I also tried the same with a new project only containing a cube, but that did not work either as there was as well only a grey screen in the browser, so there is a problem with displaying objects created in the Unity-Hub directly. Inspecting the Website I am getting a lot of Errors which are referencing the resource file 3, as I assume that this is the main source of problems.
I am new to Unity and WebGL and could not find any solutions or even approaches to this problem and was hoping for maybe an explanation what the errors are even about.
workspace:
unity version: 2021.2.1f1
small local webserver with python where I am putting the .html file on
compression disabled in the player settings of the WebGL-Build
Solved by moving to an older version (2020.3.22f1) of Unity

I can't drag Cinema 4D models from the Project Window into the Scene View

I can't drag cinema 4d models from the Project View into the Scene View.
It looks like this in Project View
Another question: can I create models in Unity like Cinema 4D ?
.c4d format will not work if you don't have Cinema 4D installed.
You can use .fbx or .obj with any additional software installed in your system.
But if you want to use direct Maya, Blender or other native format, you will need the software installed in your system.
Unity is not a 3D modeling software. So you can't create model in Unity. There are some plugins that just allow modifying model vertices data in editor.
To add to what SP. just said.
Please take a look here for all the model formats Unity accepts :
https://docs.unity3d.com/Manual/3D-formats.html
And here on how to import Cinema 4D files :
https://docs.unity3d.com/Manual/HOWTO-ImportObjectCinema4D.html
As stated at the bottom of the page, Unity can't use .c4d files directly, it simply uses the Cinema4D application behind the scenes to convert it to a fbx file.
It is also said that Cinema4D's fbx exporter is very unreliable. So I suggest you to take that into account for the future.
If somebody has problem with installing c4d unity plugin because of required administrator permission, you can fix it by this scenario :
For this to work, Unity Hub also has to run as Administrator.
Go to the Installation folder of UnityHub and open properties (Alt + Enter) of
UnityHub.exe
Open the "Compatibility" tab, there you will find a checkbox Run as administrator
Now we can do the same for Unity.
Go to the "Editor" folder of the Unity installation you want to run as administrator.
Set Administrator settings for Unity.exe (see instructions above)
Fully exit Unity and Unity Hub
Restart Unity Hub, you should see the Windows dialogue for "Run as administrator"
Open a project using the Unity version you customized and Unity will have Admin permissions.
If you have problem with dropping objects to Unity, it happens when unity is running as admin, you can just copy and past your files directly using explorer instead of direct dropping.

Deploy a HaxeFlixel game to a windows .exe file

I made a mini game with HaxeFlixel and OpenFL, It's worked great and now I want to put it on Game Jolt to check can it work or not, but to do that I need to change my whole project into executable, and I don't really know where I should start...
I looked it up and found some topic about Adobe AIR. Do I really need to use that to turn my Flixel project into an .exe? Can someone give me a little help here... I'm using FlashDevelop and Flixel for my game so right now my folder contains assets, source, hxproj file and a xml file. thanks!
You should have a dropdown at the top of the window next to play button and the release type (debug, release). In that dropdown you can select your platform, in your case select native. The first time you compile is going to take awhile because you are compiling all the lib to C++.
The result is deploy in bin/windows/windows, there you can find your executable.
You can compile with command lines. Go to your folder and type lime build windows

Old version of Unity WebPlayer binary gets loaded from cache, using Facebook Unity integration

We are in the process of switching our game from our own canvas page, to using the Unity integration on Facebook. However, during our development tests we have occasionally run into a problem where the webplayer binary gets loaded from the browser cache, even though a newer version was uploaded to the server.
Manually clearing the browser cache solves the problem, but that's not exactly a solution we want to present to our users all the time. Previously, when we embedded the unity object ourselves, we also passed in a ?version flag with the url, which would keep it up to date, but we can't exactly do that anymore with integration turned on, unless we manually update the binary location link in our app settings every time we do a build (Kind of a pain in the butt, since the rest of our build process is automated)
Is there any way around this?
Thanks.
We have exactly same problem and I can say only solution is to change the binary file name everytime you made a build but only for your production environment. Here is our solution:
We have development (sandbox mode)and production environment and one app for each one.
For development, we ran everything locally, we have buildpipeline that builds and copies the binary file to appropriate place with the same name always like MyGame.unity3d, and we have set our browsers not to cache anything, that solves the problem for testing.
For production, our buildpipeline constructs the binary name with:
YourGameNameMainVersion.SubVersion.TimeStamp like: MyGame0.3.1006-1004.unity3d and this one is manually set from facebook's app settings page in every build. But this is not a big problem as you won't want to make a new build more than once/twice a day for production.
We've found that all that needs to be done is to add "?version=xxxx"
This works, and perfectly fine. I do now, is only change version (?version=1.52) in main link:
<a href="http://cometoplaynow.com/Labyrinth3D/Labyrinth3D.html?version=1.52">
Have advantages using it:
Changing only 1 number - link is still the same (if people open game from your site)
Savings will stay as it was (if you change .unity3d you will lost PlayerPrefs).