Inspector is disabled in unity - unity3d

I added a blender file to my assets, and when I click on this file in assets I can't add a component such as SkinnedMeshRenderer to the imported asset as shown in this screenshot. How I can add it?

A SkinnedMeshRenderer is not something you can just add in Unity.
As said in the documentation:
Unity uses the Skinned Mesh Renderer component to render Bone animations, where the shape of the mesh is deformed by predefined animation sequences.
A SkinnedMeshRenderer is automatically added when a skeleton is found in your asset. To have a SkinnedMeshRenderer you must export a skeleton from blender. If you don't have a skeleton, it means that a SkinnedMeshRenderer is not required.

The "Imported Object" is a Unity asset that doesn't accept additional components. Try creating a prefab (right click in Project folder and select Create -> Prefab), give it a unique name, and then drag the "Imported Object" mentioned above, from the Project panel not from the inspector, onto the newly created prefab object in the Project panel. Components can now be added to the prefab. Whenever referencing blender models access them through prefabs in such a way. Prefab copies can be added to the scene by clicking and dragging the prefab into the scene or by using GameObject.Instantiate with scripts.

Related

Unity deforms every prefab that I create

I have problem with Unity prefabs. Every time I create a nice looking UI in main scene and I want to store it as prefab for later usage if I open this prefab it's deformed(random cliping, moved UI elements in different directions, ... such a mess). If I try to fix this prefab in prefab editor to make it nice looking like before and then if I insert this back to scene it's totally unusable. It creates bigger mess than before in prefab editor... I don't know what to do. Editor throws no errors btw.
In first image is nice looking UI(example already created). In 2nd image is prefab editor. Text is totally out of panel and 3rd is from back in scene (means removed old one UI and place stored prefab from folder) the panel is gone.
Imgur - images are orded by scene to prefab editor and back to scene
On those images you can see a 3 elements... but if I make more complex UI, it's clipping through each other in prefab editor and also back in scene.
Unity version: 2019.1.7f1

There is no ImageTarget in Assets/Vuforia/Prefabs

I followed the instructions to use Vuforia. But when I add ImageTarget, I found there is no ImageTarget in my Assets/Vuforia/Prefabs
The version of my unity is 2018.2.18f1.
I want to create an ImageTarget and Put the resources such as the model we need to display under ImageTarget as its child exists.
The picture here is what I got in Assets/Vuforia/Prefabs.
You don't need the prefab.
See Unity Manual: Adding Image Targets to your Scene
You can simply generate a new ImageTarget by clicking on GameObject → Vuforia → Image
This should add all required components like ImageTargetBehaviour, DefaultTrackableEventHandler, TurnOffBehaviour, MeshFilter and MeshRenderer.
You can also create it yourself from scratch by simply putting all the required components on an empty GameObject.
And then go on with configuring your database and target.

Export GameObject Unity to .fbx or .obj

I have built a building in unity, with cubes, etcetera. Now I want to use it as a single object (since using it with so many objects makes it difficult to move it from the scripts). Is it possible to export this to fbx and then have it in assets?
Not as fbx but yes and it's possible to have that item as prefab. If you want to have this building in your assets and use it whenever you want, just put all your shapes in an empty gameobject (to move it via just one container) and drag and drop that gameobject into your project window. Thus you'll have the prefab of that whole building mesh and you could reach it from editor or by script anytime you want.

How to replace model without a prefab file?

I'm new to ARCore and followed this article: https://haptic.al/arcore-101-fa6f93d4c003 to add a model with animation and see it with my phone camera.
I switched the model from the article (kitty) with a ball that I downloaded from Unity assets store, I just replaced the previous prefab object with the new one from the ball package that I imported.
Everything works fine, but now I want to download other model from the Unity store and I see that some models don't include the prefabs folder or a prefab file inside the the model package.
Is there another way to switch my current model with a new one without being use the prefab file?
Thank you.
Even if the downloaded file doesn't contain a prefab you can still create your own prefab by placing the object in the scene (.fbx, .obj files etc.) adding whatever materials you want it to have, and then dragging the name from the Hierarchy panel into the Project panel. The name in the hierarchy panel should turn blue if you've made a prefab successfully.
Note: you don't need a prefab to put something in the scene, a prefab represents an object that has a particular state saved instead of the defaults (transform rotation, materials, colliders, etc.). If you add things to an object and save that object as a prefab then whenever you place that prefab into the scene it will have those components still attached.

I'm having an issue importing textures with a 3d model into Unity

I am performing some research in virtual reality and we were given a 3d model made in Rhino5 with textures and everything (the model is a building). I have tried exporting it as a 3ds and fbx file type, but I am relatively new to both Rhino and Unity. My issue is that when I drag and drop the model into the unity assets of my project, and then drag from the assets to the scene, the model shows up and looks great, however no textures from the model in Rhino are visible.
I'm not sure if I should be exporting from Rhino to a specific format or if I'm exporting those formats incorrectly from Rhino.
I'm using Unity 4 and Rhino5. Thanks for your answers and your time!
The texture is stored in a file separately from your 3D model.
Quick steps:
Import your .obj or other 3D model into your unity3d assets
Import your .1001.png or .mtl or other texture material into your unity3D assets
Drag and drop your 3D model from assets into the unity3d scene
Click to select the object in the scene so it is outlined (mine is in orange)
Drag and drop your texture material from assets directly onto the selected object in the scene to apply the texture material giving the object your desired shading. The object will render the material with a shader. The object now has the qualities of the material and 3D model as one object in the scene.
For example here is a scene of a golf green. I have a 3D .obj file of the green which I select in the scene and then drag and drop my 2D material asset onto, which is a .1001.png file mapping the texture to the 3D surface. See link for image of the scene in my unity3d editor.
Image 1:
Unity3D object in assets. Dragged haddock.obj to get that 3D model.
Image 2: Unity3D materials in assets. Dragged haddock.1001.png onto the orange outlined model to give it that shade.
Normally models doesnt includes the textures, so you will have to import them separately into Unity and add them to the material on your model.
There might be a way to get a extra file when you export to fbx that will specify what shader and texture the materials should have when imported but i cant remember how to do that.