Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

169
Views
How to access or reference assets from Unity's Assets folder in Android plugin library?

I have a font that I am using to design and edit scenes in Unity. I am having an android plugin library that displays native AlertDialog in android. I want the dialog to display message using same font I use in Unity. I have placed that font in Unity's Assets/Fonts folder. I know that when font is used in any scene, it gets copied to final build apk. Now I want to access the same font and Android plugin's Java code. How can I achieve this

Here is the Java code

Typeface typeface = Typeface.createFromAsset(mainActivity.getResources().getAssets(), "Fonts/lobster-regular.ttf");

I know my path is wrong, what is the correct way of referencing font placed inside Unity's Assets folder from Android plugin's Java code.

Also I had tried placing font in Unity's StreamimngAssets folder and I was able to call that font using createFromAsset(mainActivity.getResources().getAssets(), "fonts/lobster-regular.ttf"). But the problem is that in this method I cannot use the font in Unity Editor while editing Scenes as font is placed in StreamingAssets folder.

So how can I reference Font placed in Assets folder from android plugin's Java code?

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!