- Home /
Guys i have puted a video as a background in my game menu but when i "build it" and run it crashes in the menu part? why is that happening?
my game is a 2d game for cellphone android, but for some reason when it reachs the menu the video doesnt execute and them the app crash but in the pc version everything works fine i mean the menu video... detail: i have puted my video in a cube a non 2d object dont know if that is abad thing because in the pc worked fine
Answer by JonPQ · Jul 22, 2019 at 04:05 PM
How are you playing the video? my guess would be some kind of plugin from the asset store, probably with libraries/dll's for playing the video. But does it have libraries for iOS/Android? check the documentation. Contact the creator of the plugin and ask about mobile support.
second possibility...memory... how big is the video, and what hardware are you running it on, does it have enough ram to load the video? are you loading the whole video into memory or streaming it?
Sorry I cant be more specific without more info...
so, i'm using a simple video player in canvas, and using the "render texture" in it, their sizes are 8mb and they are .mp4... i'm using them as background and they start with the game menu, i'm a begginer i don't really know how it should be to work fine... Do i need some kind of plugin to make it work?
I assume you are using the Unity video player to your render texture... check this page to see what format is supported by Android and iOS https://docs.unity3d.com/ScriptReference/Video.VideoPlayer.html
Check your video clip import settings on your clips. to see if you can match them to the platform requirements.
You might want to check this is enabled... which I think lets unity auto transcode the video into a supported format... but ideally, you already have it in the correct format before making a build. https://docs.unity3d.com/ScriptReference/VideoImporterTargetSettings-enableTranscoding.html from unity docs... "The best natively supported video codec for hardware acceleration is H.264, with VP8 being a software decoding solution that can be used when required. On Android, VP8 is also supported using native libraries and as such may also be hardware-assisted depending on models. H.265 is also available for hardware acceleration where the device supports it. $$anonymous$$ey values to look for in your encoding parameters:"
is there a way to see the console of my build i tried almost everything and is still doesn't working.... it still crashing
Answer by aditya23dedhia · Jul 23, 2019 at 07:54 PM
Your video should not be on a 3D game object in the first place,it should be on a 2D blank sprite if you just need it as a part of a menu background . And make sure that in the canvas object. scaling is set with screen size or make sure that the sprite is visible in that resolution. However, as mentioned above, this can really be due to a lot of things.
okay thank you, i solved the problem bye disabling a quality Sting in unity i dont know why it worked... haha but it worked maybe its the version of the unity im using the 2019
Your answer
Follow this Question
Related Questions
I'm experiencing constant crashes when the multiple game windows are open. 0 Answers
I can't use google admob ads 1 Answer
Unity 2.6.1f crashes 2 Answers
Unity refuses to open on my mac! 3 Answers
Text missing in Editor; huge amounts of bugs and glitches 0 Answers