This font needs to be dynamically changed so I can't put it in Resources.
I haven't found any resources or way to achieve this, all talk about Resources.
EDIT: I did look into AssetBunble but it looked overkill so I thought maybe requiring the user to install the font on his machine but Font.CreateDynamicFontFromOSFont does nothing. Whatever the given input (even invalid), it will always return the same "Arial" font and nothing visually change.
I might look into AssetBundles again but I don't want Unity installed on the target machine and if I understood right, you can't build an assetbundle without running Unity.
There is no Unity API to load standard font from disk or web into Unity's Font.
If you use Font.CreateDynamicFontFromOSFont, the font must be installed on the device. This is easy to do on some platforms like Windows but extremely hard on devices like Android.
The recommended way to do this is to use AssetBundles. You will need the Unity Editor to create the AssetBundles but you don't need it to load the AssetBundles during run-time. Put the fonts in AssetBundles then build it and host it on the server. Use UnityWebRequest API to download the Assetbundle then extract the font from it. You can always update this Assetbundle on the server.
If you want the user to to able to load the font from any source, you can automate the building part by asking the user where the font is, take that font and send/upload it to your server with the UnityWebRequest API. On the server side, run Unity Editor in a headless mode, retrieve the font sent to it and build an Assetbundle from it then send it back to the player and load it on the client side.
So, UnityWebRequestAssetBundle.GetAssetBundle is used to download the AssetBundle and AssetBundle.LoadAssetAsync is used to the fonts in it.
There is no other way to do this unless you have the Unity source code which is really expensive. By doing it this way, you won't need the font to be installed and won't run into issues on mobile devices. This post shows how to build and load an Assetbundle but you have to do that in headless mode.
Related
Ive got a Unity WebGL Build with alot of Assets (1k+) that keep increasing. Everytime a new Asset gets added the whole Thing has to be built again which takes a lot of Time.
I only need a small Amount of the Assets during Runtime but i cant know which Assets exactly (The User can decide which Assets to actually use and see during Runtime).
Ive heard about Asset Bundles but i dont quite understand them yet. Is it possible to have some Sort of external Server running on its own with all the Assets there and then have the WebGL Build load the specific Assets it needs during Runtime from that Server?
You can use Addressable Asset System with remote catalog for dynamic asset delivery using any CDN. Every time you run your game Addressable Asset System will download assets dynamically & asynchronously. This feature is successor of old asset bundle system.
I am creating a tool that users will be able to create their own contents(like powerpoint)and that content will be played in IOS Tablets. However, users should be able to load their own fonts to use in their texts in runtime. It's not available in Unity <2018.2. But I wonder if it is available on TextMeshPro since its using font assets created by their own.
Is it possible in Unity to upload and download files while in a game? I want to make a minecraft-style building game and allow the user to import and use their own models (.obj files, etc), while in the game. I've been using Playfab for a backend and Photon for online cabilities, but as far as I can tell it will only work with image files (in Playfab). Is there a way to accomplish this and what would I need to use?
Yes, the way to go is to use Asset Bundles
Asset Bundles are platform specific assets that you create in Unity, but that you don't put in your build. Instead you can download them later, just as you want.
The process is a bit long, but not that difficult. The unity manual is actually really good and it should be easy to follow. Here is the link:
Asset Bundles documentation
I installed eclipse and the FDT plugin.
Now i would like to create a flex project.
I am wondering how to get a designer for the mxml where i could drag and drop lists, buttong and build a UI in flex.
I am totally new to flex.
Also, once i have that, if I build that as an application, it seems to generate a swf file.
Not sure if i can run this in anything other than a brower. The latest adobe flash player has not standalone exe.
I would like to understand the recommended workflow if I need to build a flex application.
I am basically looking at developing a desktop/web application that has fusion charts to visualize certain data.
I am wondering how to get a designer for the mxml where i could drag
and drop lists, buttong and build a UI in flex.
The current version of Flash Builder has one, and I thought that was the only Flex IDE that had a design view. The Flash Builder design view is limited, as it only works with the current version of the Flex SDK and is all around problematic. Most developer's don't ues it and the feature will be removed in the next version of Flash Builder.
I've heard rumors that IntelliJ may add one in a future version, but I wouldn't count on it.
Once i have that, if I build that as an application, it seems to
generate a swf file. Not sure if i can run this in anything other than
a brower. The latest adobe flash player has not standalone exe.
Correct; a Flex project's primary intent is to build an SWf file that will run in the browser. At one time Adobe offered a stand alone player that the SWF would run it. I'm not sure if they still do. It was not practical to assume end users had the stand alone version of the Flash Player, though.
I have no idea if FDT supports this; but you can use the same, or similar, code with Adobe AIR to create an AIR file. The AIR file should run anywhere that the AIR runtime can be installed. If you use the Adobe AIR Captive Runtime feature on a windows PC you can create an executable.
Idea won't ever get a design view, because it requires a special version of the Flash player built into the IDE. This in turn requires access to the Player source code, and adding a bunch of platform-specific JNDI junk to your IDE. And given that even Adobe is dropping support for the design view, it's apparently not economically viable to maintain that special version, even if you have the sources to Player and the right to use them.
I am in the stages of designing a magazine concept for a client, taking the printed version and adding animated and interactive content, it seems Flash would be the obvious choice, and something which I am reasonably skilled with.
If I build the Magazine app with Flash, will the app be able to download additional issues? if so please point to any resources on the subject if possible.
You can use the Packager for iPhone to get Flash content on an iOS device. However, you can't download compiled Flash files (.swf) to the iOS device and execute them after the app has been installed.
From the developer documentation:
Loader
In an iPhone application, you cannot
use the Loader.load() method. However,
you cannot run any ActionScript code
in SWF content loaded with the
Loader.load() method. However, you can
use assets in the SWF file (such as
movie clips, images, fonts, and sounds
in the library). You can also use the
Loader.load() method to load image
files
If you would like to use InDesign and some of the other tools that Adobe Makes, you can consider the so called Digital Publishing Suite which is a toolset that was used to make some of the iPad magazines such as Wired or Martha Stewart Living.