1---2name: unity-23description: Unity engine fundamentals and workflows for 3D asset integration4---56# Unity Engine78## Unity Fundamentals910### Project Structure11- **Assets Folder**: Contains all project assets (models, textures, materials, scripts)12- **Scenes**: Individual levels or environments13- **Prefabs**: Reusable game object templates14- **Packages**: External libraries and tools via Unity Package Manager15- **Project Settings**: Global configuration for physics, graphics, input, etc.1617### GameObject Hierarchy18- **Transform**: Position, rotation, and scale of objects19- **Parent-Child Relationships**: Object hierarchy for organization and transformation20- **Components**: Modular functionality attached to GameObjects21- **Tags and Layers**: Organization and filtering for game logic2223## Unity Scripting and C# Basics2425### MonoBehaviour Lifecycle26- **Awake()**: Called when script instance is loaded27- **Start()**: Called before first Update frame28- **Update()**: Called once per frame29- **FixedUpdate()**: Called at fixed time intervals for physics30- **LateUpdate()**: Called after all Update calls complete31- **OnDestroy()**: Called when GameObject is destroyed3233### Common Unity APIs34- **Transform**: Access position, rotation, scale35- **Rigidbody**: Physics simulation36- **Collider**: Collision detection37- **Renderer**: Visual rendering control38- **Animation**: Animation playback control39- **Animator**: State machine for animations4041## Prefab and Component Architecture4243### Prefabs44- **Creating Prefabs**: Drag GameObject to Project window45- **Prefab Variants**: Inherit from base prefab with overrides46- **Nested Prefabs**: Prefabs containing other prefabs47- **Prefab Mode**: Edit prefabs in isolation48- **Prefab Overrides**: Apply or revert changes to prefabs4950### Components51- **Mesh Renderer**: Renders 3D meshes52- **Mesh Filter**: Holds mesh data53- **Skinned Mesh Renderer**: Renders animated meshes54- **Animator**: Controls animation playback55- **Rigidbody**: Physics simulation56- **Collider**: Collision detection5758## Unity Asset Pipeline and Addressables5960### Asset Import61- **Model Import Settings**: Scale, normals, tangents, animation clips62- **Texture Import Settings**: Compression, max size, mipmaps63- **Audio Import Settings**: Compression, load type, format64- **Asset Bundles**: Package assets for runtime loading6566### Addressables67- **Addressable Assets**: Load assets by address/label at runtime68- **Asset Groups**: Organize assets by build settings69- **Content Catalog**: Runtime database of addressable assets70- **Asset Loading**: LoadAsync for asynchronous loading71- **Memory Management**: Release and unload assets7273## Unity Optimization Techniques7475### Rendering Optimization76- **Draw Call Batching**: Combine similar objects into single draw call77- **GPU Instancing**: Render multiple instances with single draw call78- **LOD Groups**: Switch to lower detail models at distance79- **Occlusion Culling**: Skip rendering objects not visible to camera80- **Lightmapping**: Bake lighting for static objects8182### Performance Optimization83- **Object Pooling**: Reuse objects instead of instantiating/destroying84- **Script Optimization**: Avoid Update when possible, use coroutines85- **Physics Optimization**: Use fixed timestep, optimize colliders86- **Memory Optimization**: Use object pooling, avoid allocations in Update87- **Profiling**: Use Unity Profiler to identify bottlenecks8889## Unity Shader Graph and Visual Effects9091### Shader Graph92- **Node-Based Shaders**: Create shaders visually without code93- **PBR Master Node**: Physically based rendering94- **Unlit Master Node**: Non-physically based rendering95- **Custom Properties**: Expose parameters to material inspector96- **Sub-graphs**: Reusable shader logic9798### Visual Effects Graph99- **Particle Systems**: Create complex particle effects100- **GPU Particles**: High-performance particle simulation on GPU101- **Event Contexts**: Trigger events based on particle behavior102- **Trails and Ribbons**: Create trail effects103- **Collision Detection**: Particle collision with scene objects104105## Unity 3D Asset Integration106107### Model Import108- **FBX Import**: Import 3D models from Blender, Maya, etc.109- **Scale Conversion**: Handle different unit systems (cm vs m)110- **Animation Clips**: Extract and configure animation clips111- **Rig Import**: Import humanoid or generic rigs112- **Material Generation**: Auto-generate materials from model113114### Material Setup115- **Standard Shader**: PBR-based standard shader116- **Shader Graph Materials**: Custom shader graph materials117- **Material Properties**: Albedo, metallic, smoothness, normal maps118- **Texture Slots**: Assign textures to material properties119- **Material Variants**: Create material variations for different states