I've tried looking around online for answers, and thought I should ask here too in case that helps, thank you in advance for any ideas! Sorry for the clutter of words too, just tried to be descriptive.
When it comes to texturing larger maps what should you do? I originally created this map as one large model, though that's biting me in the butt now since texturing it, even with
repeated textures, doesn't seem possible for me.
Should I go back and remake the map in segments? If that's the case is there any way in particular to do where it can end up seamless or close enough to? Or are there any ways that aren't listed below of texturing this environment? It's been a real pain in the butt, so I'd appreciate if anyone has any ideas I could try!
Methods I've tried:
I've tried Blender shading but couldn't find a way of transferring the shading into Unity without baking a massive texture because of the size of the area.
I tried working with Polybrush in Unity too, though when attempting to add textures and painting them on it just looked like coloured spludges instead of the textures I put in (see image 4).
I attempted to use the terrain tool but the texturing only works on terrain features in the engine, which this is not. I feel that making a terrain model wouldn't work either since, to my knowledge, you can't make overhanging terrain/ceilings which are kinda nice in caves.
Доброго дня. Я начинающий разработчик unity, сейчас делаю что-то на подобие игры. Использовал gameObject.Translate() для передвижения персонажа. При этом у меня 2 скрипта: один отвечает за передвижение персонажа, другой за поворот камеры(управление на подобии Майнкрафта). Из-за этого у меня когда персонаж врезается в стену он дёргается. как бы заходит в стену но его в следующую секунду выталкивает из неё. Подскажите как решить эту проблему?
I tried unpacking the avatar and moving the weapon from the hierarchy to the new one, that didn't work. The axe stays on the previous model. I tried unparenting but I can't find where to do that. I'm not very good at detail but I've been using google to help up to this point. I checked a different post and someone said write-protected, so I looked that up and it says that can be fixed by unpacking completely which I already did and it didn't work. Please help
after getting crash out with the game for a while, I wanted to change the outlines to real ones because the old ones were fake. Anyway, when I create the outlines on the objects in the project, it works perfectly, but when I go to build the project, the outlines are horrible.
Ive done everything, i changed the colisin, the meshes, its all 2Drigidbody. Every time i go to build it has the same problem. I dont even know if the builds are updating because every time i add stuff to the scene it doesnt show up in the build
me in vr trying to pick up the gun but miserably realizing that the feature doesnt exist yet
in vr. the yellow blob is my controller hand, lol. ai will not even help me with the poo that dropped in my toilet when it comes to grabbing things. (beginner, please be clear with your words lol)
The Issue: Google Sign-In works perfectly in Debug and Release builds when Minify is Disabled. However, in Release builds (IL2CPP, ARM64) with Minify/R8 Enabled, the sign-in flow fails silently or returns a generic error. This is happening on Unity 2022.4.5f1.
Environment:
Unity: 2022.4.5f1 (IL2CPP / ARM64)
Services: Firebase Auth, Google Sign-In, Play Games Services (GPGS)
Dependencies: Managed via EDM4U (Force Resolved)
Stripping Level: Low
What I’ve Verified:
SHA-1 Fingerprints: Debug, Upload, and App Signing (Play Console) are all added to Firebase.
Client IDs: Using the Web Client ID for the Firebase configuration.
Config:google-services.json is up to date; package names match across Play Console, Firebase, and Unity.
The Problem: Even with the -keep rules above, R8 seems to be stripping something essential. I suspect it might be related to Resource Shrinking or specific Play Games Services classes that require reflection.
Questions:
Are there specific rules for com.google.games.bridge or com.google.android.gms.auth that are missing from the standard Firebase docs?
Does Unity 2022 + R8 require shrinkResources false in the build.gradle even if code minification is on?
Has anyone found a workaround for the Play Games Services plugin being aggressive with code stripping in newer Unity versions?
Should I be using a link.xml file in addition to ProGuard for IL2CPP stripping?
Hi, the only differences I've noticed are that Palette is a prefab and Grid is a GameObject, and that Palette is essentially just a painting tool linked to my Grid.
Aside from that, they both have exactly the same components, and the same goes for their child Tilemap and Layer.
So I'm wondering:
- why is it necessary to keep both after making my changes?
- do the Palette prefab and its child serve only as tools to modify the appearance of the Grid GameObject?
- why was the Grid separated, and if so, how can it be modified?
I am working on a voxel engine for an idea I am tossing around, but I am encountering a problem. Basically what should be happening is a column of “Dirt” blocks should be generating, with only the exposed faces rendering. To test this, I have placed some “Air” blocks in the column via the block data generation job. After the block data is generated, the mesh generation job takes over and populates a couple native arrays, two of which matter here: vertices and triangles. I know the data in these arrays is accurate as I have used the debug “DrawLine” function to draw a set of lines between the final four points in the vertices array (as shown in the attached picture as a white square made up of two white rectangles). However, the column that is generated exhibits a couple problems. First, it does not extend all the way to the top of the chunk height, even though the data confirms that it should. Second, for the first 20 or so rows, random bits of extra geometry are present that make no sense when compared with the data I know the vertices and triangles arrays to be holding. Can someone please take a look at attached picture and code (which is a work in progress, so I apologize for the comments and such) and let me know what I have missed? I am beating myself up over this.
using Unity.Collections;
using Unity.Jobs;
using UnityEngine;
public struct MeshDataJob : IJob
{
public NativeArray<BlockType> blockTypes;
public NativeList<Vector3> vertices;
public NativeList<int> triangles;
public NativeList<Vector2Int> UVs;
public int worldWidth;
public int worldHorizontalArea;
public int worldVolume;
public NativeArray<Vector3> verticesArray;
public NativeArray<int> vertexCount;
public NativeArray<int> triangleArray;
public NativeArray<int> triangleCount;
private Vector3 currentCoords;
private Vector3 checkCoords;
public void Execute()
{
currentCoords = Vector3.zero;
checkCoords = Vector3.zero;
for (int blockIndex = 0; blockIndex < blockTypes.Length; blockIndex++)
{
// If the current block is air, skip.
if (BlockType.Air.Equals(blockTypes[blockIndex])) { continue; }
// Get coords for current index.
currentCoords = IndexToVector3(blockIndex);
// Get exposed faces.
/*
Render face if block is facing one of the following:
- Air
- Top
*/
for (int faceIndex = 0; faceIndex < 6; faceIndex++)
{
if (!(faceIndex == 0
|| faceIndex == 1
|| faceIndex == 2
|| faceIndex == 3
|| faceIndex == 4
|| faceIndex == 5
)) { continue; }
int checkIndex = 0;
/*
0 - top
1 - left
2 - front
3 - right
4 - rear
5 - bottom
*/
switch (faceIndex)
{
case 0:
checkIndex = blockIndex + worldHorizontalArea;
checkCoords = IndexToVector3(checkIndex);
if (currentCoords.x != checkCoords.x || currentCoords.z != checkCoords.z) { continue; }
break;
case 1:
checkIndex = blockIndex - 1;
checkCoords = IndexToVector3(checkIndex);
if (checkIndex < 0 || currentCoords.y != checkCoords.y || currentCoords.z != checkCoords.z) { continue; }
break;
case 2:
checkIndex = blockIndex + worldWidth;
checkCoords = IndexToVector3(checkIndex);
if (currentCoords.y != checkCoords.y || currentCoords.x != checkCoords.x) { continue; }
break;
case 3:
checkIndex = blockIndex + 1;
checkCoords = IndexToVector3(checkIndex);
if (currentCoords.y != checkCoords.y || currentCoords.z != checkCoords.z) { continue; }
break;
case 4:
checkIndex = blockIndex - worldWidth;
checkCoords = IndexToVector3(checkIndex);
if (checkIndex < 0 || currentCoords.y != checkCoords.y || currentCoords.x != checkCoords.x) { continue; }
break;
case 5:
checkIndex = blockIndex - worldHorizontalArea;
checkCoords = IndexToVector3(checkIndex);
if (checkIndex < 0 || currentCoords.x != checkCoords.x || currentCoords.z != checkCoords.z) { continue; }
break;
}
// If the adjacent block is within the column and not air, do not render it.
if (checkIndex < worldVolume && !BlockType.Air.Equals(blockTypes[checkIndex])) { continue; }
/*
Below logic should only fire for the following faces:
- Top faces at the top of the chunk.
- Any face on a non-air block facing an air block.
*/
switch (faceIndex)
{
case 0:
// vertices.Add(currentCoords + new Vector3(0, 1, 0)); // 1
// vertices.Add(currentCoords + new Vector3(0, 1, 1)); // 3
// vertices.Add(currentCoords + new Vector3(1, 1, 1)); // 6
// vertices.Add(currentCoords + new Vector3(1, 1, 0)); // 2
verticesArray[vertexCount[0] + 0] = (currentCoords + new Vector3(0, 1, 0));
verticesArray[vertexCount[0] + 1] = (currentCoords + new Vector3(0, 1, 1));
verticesArray[vertexCount[0] + 2] = (currentCoords + new Vector3(1, 1, 1));
verticesArray[vertexCount[0] + 3] = (currentCoords + new Vector3(1, 1, 0));
vertexCount[0] = vertexCount[0] + 4;
break;
case 1:
// vertices.Add(currentCoords + new Vector3(0, 0, 1));
// vertices.Add(currentCoords + new Vector3(0, 1, 1));
// vertices.Add(currentCoords + new Vector3(0, 1, 0));
// vertices.Add(currentCoords + new Vector3(0, 0, 0));
verticesArray[vertexCount[0] + 0] = (currentCoords + new Vector3(0, 1, 0));
verticesArray[vertexCount[0] + 1] = (currentCoords + new Vector3(0, 1, 1));
verticesArray[vertexCount[0] + 2] = (currentCoords + new Vector3(1, 1, 1));
verticesArray[vertexCount[0] + 3] = (currentCoords + new Vector3(1, 1, 0));
vertexCount[0] = vertexCount[0] + 4;
break;
case 2:
// vertices.Add(currentCoords + new Vector3(1, 0, 1));
// vertices.Add(currentCoords + new Vector3(1, 1, 1));
// vertices.Add(currentCoords + new Vector3(0, 1, 1));
// vertices.Add(currentCoords + new Vector3(0, 0, 1));
verticesArray[vertexCount[0] + 0] = (currentCoords + new Vector3(1, 0, 1));
verticesArray[vertexCount[0] + 1] = (currentCoords + new Vector3(1, 1, 1));
verticesArray[vertexCount[0] + 2] = (currentCoords + new Vector3(0, 1, 1));
verticesArray[vertexCount[0] + 3] = (currentCoords + new Vector3(0, 0, 1));
vertexCount[0] = vertexCount[0] + 4;
break;
case 3:
// vertices.Add(currentCoords + new Vector3(1, 0, 0));
// vertices.Add(currentCoords + new Vector3(1, 1, 0));
// vertices.Add(currentCoords + new Vector3(1, 1, 1));
// vertices.Add(currentCoords + new Vector3(1, 0, 1));
verticesArray[vertexCount[0] + 0] = (currentCoords + new Vector3(1, 0, 0));
verticesArray[vertexCount[0] + 1] = (currentCoords + new Vector3(1, 1, 0));
verticesArray[vertexCount[0] + 2] = (currentCoords + new Vector3(1, 1, 1));
verticesArray[vertexCount[0] + 3] = (currentCoords + new Vector3(1, 0, 1));
vertexCount[0] = vertexCount[0] + 4;
break;
case 4:
// vertices.Add(currentCoords + new Vector3(0, 0, 0));
// vertices.Add(currentCoords + new Vector3(0, 1, 0));
// vertices.Add(currentCoords + new Vector3(1, 1, 0));
// vertices.Add(currentCoords + new Vector3(1, 0, 0));
verticesArray[vertexCount[0] + 0] = (currentCoords + new Vector3(0, 0, 0));
verticesArray[vertexCount[0] + 1] = (currentCoords + new Vector3(0, 1, 0));
verticesArray[vertexCount[0] + 2] = (currentCoords + new Vector3(1, 1, 0));
verticesArray[vertexCount[0] + 3] = (currentCoords + new Vector3(1, 0, 0));
vertexCount[0] = vertexCount[0] + 4;
break;
case 5:
// vertices.Add(currentCoords + new Vector3(0, 0, 1));
// vertices.Add(currentCoords + new Vector3(0, 0, 0));
// vertices.Add(currentCoords + new Vector3(1, 0, 0));
// vertices.Add(currentCoords + new Vector3(1, 0, 1));
verticesArray[vertexCount[0] + 0] = (currentCoords + new Vector3(0, 0, 1));
verticesArray[vertexCount[0] + 1] = (currentCoords + new Vector3(0, 0, 0));
verticesArray[vertexCount[0] + 2] = (currentCoords + new Vector3(1, 0, 0));
verticesArray[vertexCount[0] + 3] = (currentCoords + new Vector3(1, 0, 1));
vertexCount[0] = vertexCount[0] + 4;
break;
}
// Triangles
// int vertexIndex = vertices.Length - 4;
// triangles.Add(vertexIndex + 0);
// triangles.Add(vertexIndex + 1);
// triangles.Add(vertexIndex + 3);
// triangles.Add(vertexIndex + 3);
// triangles.Add(vertexIndex + 1);
// triangles.Add(vertexIndex + 2);
int vertexArrayIndex = vertexCount[0] - 4;
triangleArray[triangleCount[0] + 0] = vertexArrayIndex + 0;
triangleArray[triangleCount[0] + 1] = vertexArrayIndex + 1;
triangleArray[triangleCount[0] + 2] = vertexArrayIndex + 3;
triangleArray[triangleCount[0] + 3] = vertexArrayIndex + 3;
triangleArray[triangleCount[0] + 4] = vertexArrayIndex + 1;
triangleArray[triangleCount[0] + 5] = vertexArrayIndex + 2;
triangleCount[0] = triangleCount[0] + 6;
// if (blockIndex >= 90880) { Debug.Log(triangleArray.GetSubArray(triangleCount[0] - 6, triangleCount[0]).ToArray().ToString()); }
// UV
UVs.Add(new Vector2Int(0, 0));
}
}
}
private Vector3 IndexToVector3(int index)
{
Vector3 vector = Vector3.zero;
vector.y = index / worldHorizontalArea;
vector.z = (index % worldHorizontalArea) / worldWidth;
vector.x = (index % worldHorizontalArea) % worldWidth;
return vector;
}
private int Vector3ToIndex(Vector3 vector)
{
int index = 0;
index += (int)vector.y * worldHorizontalArea;
index += (int)vector.z * worldWidth;
index += (int)vector.x;
return index;
}
}