unity3d-5

Object Pooling implementation ( reusing ) in Unity runner game

有些话、适合烂在心里 提交于 2019-12-24 10:17:43
问题 I have my first runner game. Everything works fine. So, this question is about optimisation. In my game, There are 15 platforms(road prefabs on which player runs). Randomly out 15 any 1 is instantiated and this keeps happening. When player passes a few platforms, The left behind platforms gets destroyed. I made a list to keep track of platforms and delete them last platform prefab ( list[0]). And new ones are instantiated ahead. As the game approaches, It gets fast which means the operation

UNET - Sync. script for color on non-player object

余生颓废 提交于 2019-12-12 03:05:32
问题 I have tried to fix this for weeks now without succeeding and REALLY need help. I am able to sync color on my non-player objects when i initiate the color sync on the actual player object. However, the problem I have is that i want to attach a script to the non-player object that manage the color sync. I have the same for position and rotation sync that works. When i drag the non-player object i color it red and when i drop the drag i re-color it back to white. However, i get problem with

Firebase Unity iOS Problems

半世苍凉 提交于 2019-12-10 21:19:50
问题 I have setup Firebase successfully under my Android build in Unity, but am really battling getting it working in my iOS build. Unity Firebase project was setup and looks fine: I have followed all the steps on: https://firebase.google.com/docs/unity/setup I have installed CocoaPods: skywalker:sl leonard$ pod --version 1.2.0 Here is the top level generated iOS project: skywalker:sl leonard$ ls Classes Libraries Data MapFileParser Info.plist MapFileParser.sh LaunchScreen-iPad.png Unity-iPhone

Unity3D - Replay a non-looping Particle System

醉酒当歌 提交于 2019-12-02 08:46:27
问题 I'm following the Survive Shooter Unity3D tutorial and have come across several inconsistencies between the Unite Day presentation and actual behavior in Unity 5.3, such as animation transition and other small issues I had to figure out to achieve the desired gameplay result and follow the tutorial. One issue I'm unable to resolve is replaying a non-looping particle system. In the game hit particles are emitted whenever an enemy is shot, but when running the game these particles are emitted

TimeZoneInfo.FindSystemTimeZoneById() throws exception in a Unity application

回眸只為那壹抹淺笑 提交于 2019-11-27 08:07:13
问题 If I execute this code in a C# console application, it works fine. TimeZoneInfo easternZone = TimeZoneInfo.FindSystemTimeZoneById("Eastern Standard Time"); Console.WriteLine(easternZone.DisplayName); However, when I use the same method in a Unity application, an exception is thrown: System.TimeZoneNotFoundException: Exception of type 'System.TimeZoneNotFoundException' was thrown. at System.TimeZoneInfo.FindSystemTimeZoneByFileName (System.String id, System.String filepath) [0x00000] in