Quantcast
Viewing all 202 articles
Browse latest View live

UnityYAMLMerge error: Cannot find transform parent for fileID

Good day. I hope this is the correct place to post this question. If not, please feel free to point me in the right direction. I have my Unity project set in a repository shared with my dev team, using SourceTree + UnityYAMLMerge + Meld to do version control and merging. I'm trying to pull from remote and merge into my local branch, but since the remote is several commits ahead, I get a conflict in my main scene. Up until now, I had been able to use UnityYAMLMerge without any issue to solve conflicts, but this time I'm suddenly getting an error message that says "UnityYAMLMerge error: Cannot find transform parent for fileID". Any idea what this error means? Thanks in advance.

Gradle error after Facebook SDK update

Hi everyone i recently updated my Facebook SDK and keep getting this Gradle error when i try to build the apk * What went wrong: Execution failed for task ':processReleaseManifest'. > Manifest merger failed : Attribute activity#com.facebook.FacebookActivity@theme value=(@style/com_facebook_activity_theme) from [:com.facebook.android.facebook-common-5.8.0:] AndroidManifest.xml:32:13-63 is also present at [:facebook-android-sdk-4.14.0:] AndroidManifest.xml:32:13-72 value=(@android:style/Theme.Translucent.NoTitleBar). Suggestion: add 'tools:replace="android:theme"' to element at AndroidManifest.xml:29:9-32 :66 to override. This is how my Manifest looks like. Anyone know what I need to edit in my manifest so I can fix this?

Which files are mergeable with Unity Smart Merge?

I was searching about Unity Smart Merge (with git), and lots of people used different setting with this. Some say Unity Smart Merge can merge `*.meta, *.unity, *.asset, *.prefab`, others say Unity Smart Merge can merge `*.unity, *.asset, *.prefab`, the others say Unity Smart Merge can merge only `*.unity, *.prefab`, and there was even someone suggesting Unity Smart Merge can merge nearly everything, `*.mat, *.anim, *.unity, *.prefab, *.physicsMaterial2D, *.physicsMaterial, *.asset, *.meta, and *.controller`. So who is right? Which files are mergeable with Unity Smart Merge?

Is there a way to put images on each side of a cube,so that only clickable areas of the cube would be those images ?

*Details* : I have a cube that is rotating,but now I want to put small images on each side of the cude and those images would be clickable objects

Problem when merging object with Probuilder

When I merge two objets in Probuilder I get a new object whose I cannot grab/move its vertices, edges or faces (like it is not Probuilderised). When I try to pick/move an edge I get the following message in the console: > Blockquote KeyNotFoundException: The given key was not present in the dictionary. System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) (at <437ba245d8404784b9fbab9b439ac908>:0) UnityEngine.ProBuilder.ProBuilderMesh.CacheSelection () (at Library/PackageCache/com.unity.probuilder@4.2.3/Runtime/Core/ProBuilderMeshSelection.cs:112) UnityEngine.ProBuilder.ProBuilderMesh.get_selectedSharedVerticesCount () (at Library/PackageCache/com.unity.probuilder@4.2.3/Runtime/Core/ProBuilderMeshSelection.cs:64) UnityEditor.ProBuilder.MeshSelection.RecalculateSelectedComponentCounts () (at Library/PackageCache/com.unity.probuilder@4.2.3/Editor/EditorCore/MeshSelection.cs:268)> Blockquote I have been using Probuilder for one year now and I did not have this problem before. I recently updated Unity to 2019.3.5f1 (but the issue did not happen directly after the update) and I use the latest Probuilder 4.2.3. It happens also to older projects. Here you can see a prototype tree before and after merging. ![alt text][1] [1]: /storage/temp/154445-photo.jpg Anyone has the same issue? Can you help me or direct me to a corresponding thread?

Unityyamlmerge parsing error

When I try to merge a scene (Sandbox.unity) it prints the following message with the error: ` Merging: Project Chemistry/Assets/_Scenes/Sandbox.unity Normal merge conflict for 'Project Chemistry/Assets/_Scenes/Sandbox.unity': {local}: modified file {remote}: modified file Error parsing file '.\Project Chemistry\Assets\_Scenes\Sandbox_REMOTE_25408.unity': could not find expected ':' Project Chemistry/Assets/_Scenes/Sandbox.unity seems unchanged. `

connect a cube and a circle in unity editor ( not by code please)

Hello everyone, For now my pj is a rotating cube. Works fine. I want to connect a circle, which will be the head of it. How i do this in unity editor. This is not part of the gameplay so no code needed. [1]: /storage/temp/163970-pj.png

Combine two game objects destroy them and create a new one

Hello everybody, I'm new to Unity and have the following problem: I'm trying to develop an idle game in which two characters can be combined and a better character appears. You know the game principle. How do I write this as code that two game objects can be combined and destroyed and the better figure appears in the same position? public GameObject GO1; public GameObject GO2; private Vector3 oldPos; private void OnCollisionEnter(Collision collision) { if (collision.gameObject) { Vector3 oldPos = transform.position; Destroy(collision.gameObject); Instantiate(GO2, oldPos , Quaternion.identity); } } Thanks for the help and greetings from Germany

Unity Collab

I'm about to go crazy. I really need help about collab issue. Before I see that error, I imported WinMerge after a recommendation. Could this have caused the error ? Or something else idk... Thx for any help already.

Is there a way to merge 2D tiles into one mesh?

I'm using a shader to add checkerboard pattern to my 2D tiles but since they're not one mesh the UV's are tiled as well and don't spread over the whole tile group. Is there a way to merge the tiles into one mesh? This is what it looks like ![2D tiles][1] [1]: /storage/temp/171024-screenshot-2020-11-14-174210.png

Unity Smart Merge, GitBash, and P4Merge Tool not working together

I am having an issue with Unity Smart Merge where it will not open the backup merge tool if it fails to automerge. The error I receive is: Unknown mode '"%programs%\Perforce\p4merge.exe"' on line 20. Couldn't load spec file 'C;\Program Files\Unity\Hub\Editor\2019.2.2f1\Editor\Data\Tools\mergespecfile.txt.' I have the mergespecfile in that location, and also have the p4merge tool where it describes it to be. Line 20 of my mergespecfile.txt reads: use "%programs%\Perforce\p4merge.exe" "$BASE" "$LOCAL" "$REMOTE" "$MERGED" I do not know why it hasn't been able to pull up the p4 merge tool, and it is causing quite a hassle in maintaining a project I am working on. Please help.

Merge two gameobjects and create a new one unity2D!

Hello everyone. I'm making a game like 2048: shoot and merge. it's a little different than the normal 2048 and that's why I can't find any help anywhere. I designed the game in a way that is will instantiate tiles and send them up but, I don't know how can I merge them! this is the code i that I have right now and it gives me a log but, I don't know how can I manage to destroy it and instantiate the tile with the higher number just once. public class OneTile : MonoBehaviour { public int timevalue; public bool mergeTile; private void OnCollisionEnter2D(Collision2D collision) { if(collision.gameObject.tag== this.gameObject.tag) { Debug.Log("Merge!") } } }

Merging meshes

Hi Everyone, i'm trying to merge meshes with different material on a single mesh with different submeshes associated: every mesh i try to merge is considered as a single submesh of the new generated gameobject, each with the original material. Here my code: public void Merge(GameObject[] gameObjects, string Name) { if (gameObjects.Length == 0) return; Material[] materials; MeshFilter[] meshFilters = new MeshFilter[gameObjects.Length]; MeshRenderer[] meshRenderers = new MeshRenderer[gameObjects.Length]; Mesh combinedMesh = new Mesh(); combinedMesh.subMeshCount = gameObjects.Length; int size = 0; for (int i = 0; i < gameObjects.Length; i++) { meshFilters[i] = gameObjects[i].GetComponent(); meshRenderers[i] = gameObjects[i].GetComponent(); size = meshRenderers[i].sharedMaterials.Length + size; } materials = new Material[size]; CombineInstance[] combine = new CombineInstance[gameObjects.Length]; for (int i = 0; i < gameObjects.Length; i++) { int j; if (i == 0) { j = 0; } else { j = meshRenderers[i - 1].sharedMaterials.Length; } combine[i].subMeshIndex = i; combine[i].mesh = meshFilters[i].sharedMesh; combine[i].transform = meshFilters[i].transform.localToWorldMatrix; for (int k = 0; k < meshRenderers[i].sharedMaterials.Length; k++) { materials[j + k] = meshRenderers[i].sharedMaterials[k]; } } combinedMesh.CombineMeshes(combine); AssetDatabase.CreateAsset(combinedMesh, "Assets/" + Name + ".asset"); GameObject combinedObject = new GameObject(Name); var filter = combinedObject.AddComponent(); filter.sharedMesh = combinedMesh; var renderer = combinedObject.AddComponent(); renderer.sharedMaterials = materials; } #endregion unfortunately i'm not able to have the final gameobject with all the preexisting materials of each mesh to merge: could someone help me in this? Thanks a lot,

When I merge 2 objects it spawns 2 objects

I just started to make a merge game. I try to merge 2 objects but because the script is in both of the objects it repeats the script 2 time and it spawn 2 objects instead of 1. Here is the code. using System; using System.Collections; using System.Collections.Generic; using UnityEngine; public class merge : MonoBehaviour { public GameObject box2Prefab; private void OnTriggerEnter2D(Collider2D other) { if (other.transform.tag == "box1") { GameObject box2z = Instantiate(box2Prefab); box2z.transform.parent = transform.parent; box2z.transform.position = this.transform.position; Destroy(other.gameObject); Destroy(gameObject); } } } I cant delete the script on the other object because if I put a spawner it won't work.

Script to Merge terrains tiles into one?

Hi, is there a script to merge terrain tiles into one terrain? Kind Regards, SkandY

Is there a script to merge terrain tiles into one terrain?

Hi, is there a script to merge terrain tiles into one terrain? No stitching needed, just reconfigure tiling. Kind Regards, Skandy

It is possible to export multiple Unity objects into one FBX or OBJ file?

I have a city block I've carefully set up in my Unity scene. I want to combine all the objects together either as a prefab or one object. I also want to add details that are easier to add in Blender. My understanding is that you cannot merge objects in Unity, and that prefabs are made when exporting a file from Blender (or a similar software), which then shows up in Unity as a prefab. I have found addons and methods to export objects as FBX files, but I don't want to export 50+ objects by hand and then import them by hand as well. Is there any way I can export the whole scene, or multiple selected objects, to one FBX or OBJ file? Or a different solution to export all the objects as one into Blender?

Revision Control Diff/Merge : SourceGear DiffMerge "Eye" Icon Not Appearing

Hi, Like the title states, I have `SourceGear Diff/Merge` installed and have used it before, but its been quite some time and can't get it to work. The "eye" icon that should appear in my Collaborate/commits is not showing up and I'm having trouble finding any other information regarding the matter. I have made sure that SourceGear is set up properly in `Edit/Preferences/External Tools`. Thank you for any and all help in this matter.

Merge Mechanic finding nearby objects to "Merge in Bulk"

I'm trying to make a top-down game similar to Clash and TopWar with the merge mechanics. At the moment I have the ability to merge using the code below. private void OnTriggerEnter(Collider collision) { Debug.Log("Colliding With: " + collision.transform.name); colliding = true; if (collision.transform.gameObject.GetComponent() == null) { return; } if (collision.transform.gameObject.GetComponent().soldierLevel == soldierLevel) { canMerge = true; } } private void OnMouseUp() { if(colliding) { if (canMerge) isMerge(collisionObject); else { //Outline red. GetComponent().enabled = true; GetComponent().OutlineColor = Color.red; } } } Then OnMouseUp() resets the local variables for another object to be dragged. The question I have now is that in games like Evermerge and TopWar, when you merge one object with another if there are items of the same tier you can merge as well then you can merge them all at once. I added a screenshot for reference. ![alt text][1] I'm building it in 3D and I think my approach with the colliders might be wrong. I've thought about maybe trying to find similar objects from the perspective of the grid to see if there are any objects on the grid that are 5 up or 5 across, but I'm not sure how to use the Grid object like this other than using it as a reference to snap objects into place when being dragged. Let me know if you need any other details. Thanks in advance! [1]: /storage/temp/198519-img-2826.jpg

.unity scene file size sudden increase after merge attempt. Contains deleted [SerializeField] data. How to clean the file?

Hi everyone! ---------- TL;DR: Unity file size shot up 20x when trying to merge. Seems to contain deleted serialized data. How to clean/prevent in the future? ---------- I'm quite new to Unity and coding in general and we've encountered this little issue suddenly with the physical file size of our .unity files. ---------- We've been using Git as a way to keep some version control for our game which is a small puzzle game based entirely on canvas/UI elements. When we forked our code base to work on it separately, the size of the .unity file for our main scene was about 30kb. We each worked on our portion of the game a little bit then we attempted to merge. At this stage our unity scenes were about 40kb each. ---------- We attempted several methods of merging our game, since we were both using the same scene, we attempted to merge with YAMLmerge and P4Merge. We couldn't get that to work so we attemped to discard the merge changes and try again with Tortoisemerge, but again we had no luck. We ended up just saving our scene under a different name, exporting it as a package, and importing it into the other copy of the game and copying everything relevant over. ---------- After this process was complete, our .unity scene file size was 900kb. While it doesn't seem like much, compared to the 40kb sizes we were working with, there's some sort of sudden increase. We're also trialing Unity Collab now, and uploading 1mb scene files everytime you want to change a variable in a serialized field takes a while. I attempted to create a new scene, copy everything over and then save the new scene, but it was exactly the same size as before. ---------- After investigating the .unity file with a text editor, I found lots of data belonging to variables that have been [SerializeField]. However, most of the variables in the .unity file were old and had been deleted long ago. I found a reference to a deleted array that we threw a huge bunch of data in, in the .unity file and deleted it, reducing the total file size to 470kb. There seems to be more but currently there are 15,000 lines of text in here in a not very human readable format. ---------- There is a reference to YAMLmerge at the top of the file as well, so maybe it's some old merge data that hasn't been cleaned away, or we've done something wrong. Either way, this seems like a small issue now but it may become a larger one if we continue to make the mistakes that lead us to this point. What is causing the file size to bloat out? How can we prevent it? Is there a way to clean our current file back to exactly what the scene contains and no irrelevant data? ---------- Thanks for your time!
Viewing all 202 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>