Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

172
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda