We are currently working on various project as a team. As such, we often have to transfer scenes and such from one project to another. However, we have a problem concerning the lightmaps.
When I take my scene, make a package out of it all (lightmaps included) and then export, when I import in the other project, the lightmaps are there, (as in, in the "Lightning" window, they are present and loaded) but they just don't apply on the scene. It's like they aren't here at all.
And so we have to rebake everything, which makes us lose hours of work. (And as the graphic guy, it frustrates me that I have to wait two times)
Any tips on how to deal with this issue ?
Thanks !
Related
We are developing a Top Down RPG Game. So, there's a question about NPCs. Making a lot of NPC FBX files would not be optimal. From what I know, people usually make 3-4 bodies and a bunch of heads, so the NPCs would look different. Do you guys have any idea, if there's an optimal way of doing that?
I tried modelling bodies and heads in separate files and then putting heads onto the empty object on top of the body (this empty object was part of the FBX itself). It didn't work, as the actual head always displayed too high above, so it looked like the head was hovering in the air.
I also thought about making heads a part of one big FBX with just one body. So all the head would be on the same coordinate in space, and so in Unity there would be a possibility of making active just one head in time. I still don't think it would be very optimal.
So, is there a way people usually do this? I mean, this must be really common. They used it in Gothic, for sure and in many other games. So there must be an optimal way, but I'm unable to find it.
There are a few character customization packages available on asset store that you could use. I recommend UMA2 (Unity Multipurpose Avatar). It is a perfect tool and I'm using it on one of my projects and it's really gets the job done. And the good thing is that it's free. Once you imported it into your project, you can either buy contents (cloth, hair, face, ...) or create your own contents like I do using blender. There are tutorials about how to integrate and create contents on Secret Anorak youtube channel.
When add Standard Shader to Graphics——Always Include Shaders, Unity always stucks in sharedassets0.asset. I know it's unity complies shader variants in the background. it's about 60000 variants which make the .apk size is triple bigger than normal size. And it takes a long time(a couple of hours) to build, even if an empty project.If I remove the shader from the list, when I load a model from asset bundle, it will be a pink.Only add Standard to the list, then everything is ok!Is there any way to solve this problem? Please help me!I googled all I can google!
Edit: Unity 2018.2 added IPreprocessShaders which is described at:
https://blogs.unity3d.com/2018/05/14/stripping-scriptable-shader-variants/ You can review each individual shader keyword combination in IList<ShaderCompilerData> and remove ones you are certain you don't need. The this API is not complicated, but standard shader keywords are not well documented. Some of the keyword correspond to enum BuiltinShaderDefine while others are not. I ended up using this preprocessor to remove any ShaderCompilerData with BuiltinShaderDefine.UNITY_HARDWARE_TIER1, BuiltinShaderDefine.UNITY_HARDWARE_TIER2 and INSTANCING_ON(This is not in the BuiltinShaderDefine enum) turned on since I am certain we didn't use quality settings toggle and instancing.
The Unity Shader Variant Collections works kind of wonky. I ended up using a plugin called "Shader Control" to clean up the mess. But the process is still far from enjoyable since when you remove a keyword there is a chance you break something.
The best solution I could think of is remove all the "Built-in Shader" (Maybe not "Deferred" is you are using Deferred Rendering) and "Always Include Shaders" at the beginning of the project and if someone needs a built-in shader, download "Builit in Shaders" from the Unity Download Archive and import only the one needed back to the project. So that you can:
Have 100% control over built-in shader
Only compile shaders you used
Avoid shader duplication in AssetBundles (If you pack something referencing default imported shaders, the shader will be duplicated for each AssetBundle)
But this "best solution" is certainly more of a hindsight and does not help your current situation though. Give Shader Control a try.
Hi I want to suggest a method that worked for me. I was going to comment but my reputation hasn't reached 50. I would not recommend this as answer but no harm for you in trying I guess.
Instead of including the shaders under Graphics——Always Include Shaders I went to Project Settings -> Player -> Optimization and included the shaders under Preloaded Assets.
I also have doubts if it is the correct way to do so but it solved my problem. I would be glad if anyone could point out what was wrong about it and explain a bit, as I could not find much reference to this method on the Internet.
I have posted a similar question at game dev stack exchange
https://gamedev.stackexchange.com/questions/190092/unity-2020-3-what-is-best-practice-to-include-shaders
My question revolves around how to get behaviours described by a node-based editor to map to actions in-game. I've searched for several weeks about how to do this but can't find anything. If anyone could point me in the right direction, I'd be really grateful!
I don't know the best way to ask this question - I don't want to overload the question with what I've done, so I'll elaborate a bit below, as best I can:
I currently have a custom node-based editor I wrote for Unity, which I use to graphically edit the behaviour of bosses and NPCs. It looks like this (with the right-click menu shown):
I did find a way to get this behaviour working in-game, but it feels wonky and I'm wondering if there's a better way.
The way it works is there are two objects to be serialized per node object. I currently have these setup as scriptable objects, though if I were to do this again I'd create my own kind of serialization. These two objects are:
The Node in the editor window, containing editor scripts
The associated in-game action, to be loaded by the NPC at runtime
This creates a bit of mess in the file structure, as well as the amount of script files I need. On top of this, it's a bit tricky to manage cases where multiple actions are being performed simultaneously, and I need to change the NPC's state (e.g. phase1 to phase2 of a boss fight), which sounds to me like a design issue.
I'd be happy to share source code or more screenshots, if at all necessary. What I'm looking for is a way to approach something like this in a structured way that allows scalability for other projects (e.g. NPC behaviour for an RTS)
Is there a way to know what is of all my GO, textures, sounds, etc, are not in use in all scenes, to delete it?
When i tested my game, I have inserted some textures, sounds, GO etc and some of them are not in use.
I'm using Unity 5.1.1.
2018 ..
The modern solution is simply ..
Click on your scene(s) and select "Select Dependencies".
It will show you what is used; the rest is unused. Really it's that easy.
As with many things in Unity pipeline, it is very common to use an asset, virtually every project uses a few well known assets. "A+ Assets Explorer" (link) is very common.
When Unity builds the executable, it does so only with required assets. Anything else that might exist in your scenes or projects is simply ignored.
This answer over on Unity Answers has more info.
There are also options available in the Asset Store, such as this one.
Asset Hunter is a tool that analyzes your buildlog and gives you an easily understandable overview over unused assets in your project folder.
The results are grouped into folders and file types, making it easy to start cleaning up your project.
I wish I could pose more specific questions on this topic, but what I'm really looking for is a bird's eye view - a blog post, something from Adobe, documentation or even a book that outlines an approach, because I've had a tough time finding something comprehensive.
I've primarily been developing in a 2 man team with Flash Pro for years - an artist and developer. I've also worked in larger teams, using the same workflow:
AS code written as class files using Flash Pro editor, with minimal code on the timeline (only stops and an occasional function call when the timeline hits a certain frame).
Library assets are linked to AS3 classes where needed
Assets are placed on the main stage & main timeline, for maximum convenience of the designer.
Apps are published and built by exporting to swf with Flash Pro
No source control whatsoever except telling each other if we are going to change the fla.
Our shop is on the verge of bringing in more coders to develop a series of Flash browser games, and I'm thinking it's time to bring this workflow into the current reality. We'll want to have something that suits both artists and coders (minimizing complaints from either camp), as well as git support for source control.
Finally, my questions:
How are most developers authoring games currently? I've read a popular approach is to create art assets in a fla using Flash pro, link them to classes and export to a SWC. Code is then developed in Flash Builder, where assets are embedded.
If I take the SWC approach, is all code stripped from the timeline of MovieClip assets?
I'm aware that Flash Builder has an option to create a 'Flash professional' project which integrates the two and seems ideal, but going back and forth between Builder and Pro seemed to be crash prone. Does anyone use this approach reliably?
Will CS6 give us any advantages over CS5.5 to make it more developer friendly; ie. code-completion, etc.
Is there a way to set up workflow so the artist could make changes and then build/run the game from Flash Pro, and the developers could do it from Flash Builder - or would everyone need Flash Builder to run?
Are there any good 3rd party tools that provide code completion and an all around better development environment then the flash IDE (as an alternative to Flash Builder)?
Do people see Flash Builder as a 'must have' when working in teams or in general Flash dev?
Thanks for answering any part of these questions, or just simply sharing your experiences, opinions, and personal preferences. Any knowledge will be a big help at this point!
That is a lot of questions for one question. I'll try to somewhat cover the main topic of workflow.
The approach you describe with a pure ActionScript project with swc:s linked in is probably the most common approach (at least when it comes to more complex projects) as you want to separate code from content as much as possible. Usually I work with one artist so we sync up on functional design and then I define how the scene objects should be structured (i.e. a container clip, with XYZ child clips, naming, linkage and everything) to make it fit in with current framework or new supporting code.
You do not want any code in the flash pro timeline whatsoever, you want it all in your ActionScript files. Ideally as a programmer you shouldn't have to go into the flash scene project. However, in reality you probably will. I usually try to keep this to my own placeholder scene so I don't contaminate the production files with test and placeholders. You also really don't want several people editing in the same scene at once. One approach is to split up into several different scene projects. If you make a card game you could have something like this: card.swc, mainScene.swc, opponents.swc. That also allows for some concurrency if you are working with multiple artists.
Keeping the flash pro files in xfl format makes it a bit more source control friendly and you could actually merge two versions of the same scene but it can be a bit complex at times.
I usually solve this by making quick functional placeholder graphics that can later on is replaced by an artist (or render graphics from code).
When it comes to IDE:s, I think the most popular ones are FlashDevelop, Flash Builder and IntelliJ IDEA (With Flash Builder as my personal favourite). Get started with one and try some of the others in due time. Make sure the functions you use all day long are really good. However, if you have only been working with the flash professional environment before anything will be a drastic improvement on productivity.
I for one prioritize searching, refactoring and ease to follow the program flow, which simplifies debugging and getting into other peoples code quickly. But it all really comes down to finding a tool that runs on a frequency you can tune your mind into.
I hope that answered some of your thoughts and questions. Do not hesitate to follow up with more of them.