This media is not supported in your browser
VIEW IN TELEGRAM
Have you ever spent way too much time on a little thing for your game only to then scrap it and forget about it? Just found and finished this chemical flask shader for our escape room game. Last time I worked on it was probably a year ago...
https://redd.it/1i7m7r2
@r_Unity3D
https://redd.it/1i7m7r2
@r_Unity3D
Media is too big
VIEW IN TELEGRAM
I needed to add splitters and mergers to my farm product automation game. And I thought, why just 3 in and out?! What do you guys think? I hope it will work well logistically (needs some tests)
https://redd.it/1i7ki53
@r_Unity3D
https://redd.it/1i7ki53
@r_Unity3D
Story looping back issue with Ink
Hi, I'm running into a bug when using Ink in my project, where at the first chance the player can select from choices, the dialogue panel closes. The console is printing Debug messages I wrote showing that for some reason, after the player makes their choice, the story is looping back to the main knot rather than proceeding.
I don't think it's an issue with my Ink noscript because it runs fine in Inky.
I think it's something in my dialogue manager? I built it from a tutorial and I've done my best to understand it, but since I'm a beginner it's definitely a challenge. Thank you for any help anyone can provide. I'll attach my DialogueManager noscript as well as my Ink noscript.
[Here is the console log.](https://imgur.com/a/0B5P0vU)
FYI: In this dialogue manager noscript I removed any mentions of the tags, just to try to debug. So this noscript isn't doing anything with the choices at this point. I'm just trying to proceed through the whole Ink story.
-> main
=== main ===
Welcome to the platform.
Now that you're here, would you like an extra ability?
* [Yes]
Excellent, what ability would you like?
* * [An extra-high jump!] -> high_jump
* * [More speed] -> speed_boost
* * [Make me bigger] -> make_bigger
* [No]
Come on, choose an ability -> main
=== high_jump ===
#ability: high_jump
You chose high jump
-> END
=== speed_boost ===
#ability: speed_boost
You chose speed_boost
-> END
=== make_bigger ===
#ability: make_bigger
-> END
using UnityEngine;
using TMPro;
using Ink.Parsed;
using System.Collections.Generic;
using Ink.Runtime;
using UnityEngine.EventSystems;
public class DialogueManager : MonoBehaviour
{
[Header("Dialogue UI")]
[SerializeField] private GameObject dialoguePanel;
[SerializeField] private TextMeshProUGUI dialogueText;
[Header("Choices UI")]
[SerializeField] private GameObject[] choices;
private TextMeshProUGUI[] choicesText;
private Ink.Runtime.Story currentStory;
public bool dialogueIsPlaying { get; private set; }
private static DialogueManager instance;
private void Awake()
{
if (instance != null)
{
Debug.LogWarning("More than one instance of DialogueManager found!");
}
instance = this;
}
public static DialogueManager GetInstance()
{
return instance;
}
private void Start()
{
dialoguePanel.SetActive(false);
dialogueIsPlaying = false;
// get all of the choices text
choicesText = new TextMeshProUGUI[choices.Length];
int index = 0;
foreach (GameObject choice in choices)
{
choicesText[index] = choice.GetComponentInChildren<TextMeshProUGUI>();
index++;
}
}
private void Update()
{
if (!dialogueIsPlaying)
{
return;
}
if (Input.GetKeyDown(KeyCode.Return))
{
Debug.Log("Return key pressed.");
ContinueStory();
}
}
public void EnterDialogueMode(TextAsset inkJSON)
{
Debug.Log("EnterDialogueMode called");
currentStory = new Ink.Runtime.Story(inkJSON.text);
dialoguePanel.SetActive(true);
dialogueIsPlaying = true;
ContinueStory();
}
private void ExitDialogueMode()
{
Debug.Log("Exiting dialogue mode triggered");
dialogueIsPlaying = false;
dialoguePanel.SetActive(false);
dialogueText.text = "";
}
private void ContinueStory()
{
Debug.Log("Calling ContinueStory.
Hi, I'm running into a bug when using Ink in my project, where at the first chance the player can select from choices, the dialogue panel closes. The console is printing Debug messages I wrote showing that for some reason, after the player makes their choice, the story is looping back to the main knot rather than proceeding.
I don't think it's an issue with my Ink noscript because it runs fine in Inky.
I think it's something in my dialogue manager? I built it from a tutorial and I've done my best to understand it, but since I'm a beginner it's definitely a challenge. Thank you for any help anyone can provide. I'll attach my DialogueManager noscript as well as my Ink noscript.
[Here is the console log.](https://imgur.com/a/0B5P0vU)
FYI: In this dialogue manager noscript I removed any mentions of the tags, just to try to debug. So this noscript isn't doing anything with the choices at this point. I'm just trying to proceed through the whole Ink story.
-> main
=== main ===
Welcome to the platform.
Now that you're here, would you like an extra ability?
* [Yes]
Excellent, what ability would you like?
* * [An extra-high jump!] -> high_jump
* * [More speed] -> speed_boost
* * [Make me bigger] -> make_bigger
* [No]
Come on, choose an ability -> main
=== high_jump ===
#ability: high_jump
You chose high jump
-> END
=== speed_boost ===
#ability: speed_boost
You chose speed_boost
-> END
=== make_bigger ===
#ability: make_bigger
-> END
using UnityEngine;
using TMPro;
using Ink.Parsed;
using System.Collections.Generic;
using Ink.Runtime;
using UnityEngine.EventSystems;
public class DialogueManager : MonoBehaviour
{
[Header("Dialogue UI")]
[SerializeField] private GameObject dialoguePanel;
[SerializeField] private TextMeshProUGUI dialogueText;
[Header("Choices UI")]
[SerializeField] private GameObject[] choices;
private TextMeshProUGUI[] choicesText;
private Ink.Runtime.Story currentStory;
public bool dialogueIsPlaying { get; private set; }
private static DialogueManager instance;
private void Awake()
{
if (instance != null)
{
Debug.LogWarning("More than one instance of DialogueManager found!");
}
instance = this;
}
public static DialogueManager GetInstance()
{
return instance;
}
private void Start()
{
dialoguePanel.SetActive(false);
dialogueIsPlaying = false;
// get all of the choices text
choicesText = new TextMeshProUGUI[choices.Length];
int index = 0;
foreach (GameObject choice in choices)
{
choicesText[index] = choice.GetComponentInChildren<TextMeshProUGUI>();
index++;
}
}
private void Update()
{
if (!dialogueIsPlaying)
{
return;
}
if (Input.GetKeyDown(KeyCode.Return))
{
Debug.Log("Return key pressed.");
ContinueStory();
}
}
public void EnterDialogueMode(TextAsset inkJSON)
{
Debug.Log("EnterDialogueMode called");
currentStory = new Ink.Runtime.Story(inkJSON.text);
dialoguePanel.SetActive(true);
dialogueIsPlaying = true;
ContinueStory();
}
private void ExitDialogueMode()
{
Debug.Log("Exiting dialogue mode triggered");
dialogueIsPlaying = false;
dialoguePanel.SetActive(false);
dialogueText.text = "";
}
private void ContinueStory()
{
Debug.Log("Calling ContinueStory.
Imgur
Discover the magic of the internet at Imgur, a community powered entertainment destination. Lift your spirits with funny jokes, trending memes, entertaining gifs, inspiring stories, viral videos, and so much more from users.
Can continue: " + currentStory.canContinue);
if (currentStory.canContinue)
{
dialogueText.text = currentStory.Continue();
Debug.Log("Displaying line: " + dialogueText.text);
DisplayChoices();
}
else
{
Debug.Log("Exiting dialogue mode from ContinueStory.");
dialogueText.text = "Press Enter to exit the dialogue.";
StartCoroutine(WaitBeforeExit());
}
}
private void DisplayChoices()
{
List<Ink.Runtime.Choice> currentChoices = currentStory.currentChoices;
Debug.Log("Total choices available: " + currentChoices.Count); // Verify the number of choices
foreach (var choice in currentChoices)
{
Debug.Log("Choice: " + choice.text); // Print each choice text
}
int index = 0;
foreach (Ink.Runtime.Choice choice in currentChoices)
{
choices[index].gameObject.SetActive(true);
choicesText[index].text = choice.text;
Debug.Log($"Enabling choice button {index} with text: {choice.text}");
index++;
}
for (int i = index; i < choices.Length; i++)
{
Debug.Log($"Disabling unused choice button {i}");
choices[i].gameObject.SetActive(false);
}
StartCoroutine(SelectFirstChoice());
}
private System.Collections.IEnumerator SelectFirstChoice()
{
Debug.Log("Selecting the first choice button");
// Event System requires we clear it first, then Wait
// for at least one frame before setting the current selected game object
EventSystem.current.SetSelectedGameObject(null);
yield return new WaitForEndOfFrame();
EventSystem.current.SetSelectedGameObject(choices[0].gameObject);
}
public void MakeChoice(int choiceIndex)
{
Debug.Log($"MakeChoice called with index: {choiceIndex}");
currentStory.ChooseChoiceIndex(choiceIndex);
// Log current path in the Ink story
Debug.Log("After making a choice:");
Debug.Log("Current text: " + currentStory.currentText);
Debug.Log("Can continue: " + currentStory.canContinue);
Debug.Log("Choices available: " + currentStory.currentChoices.Count);
if (currentStory.canContinue)
{
Debug.Log("Story can continue. Calling ContinueStory.");
ContinueStory();
}
else
{
Debug.Log("Story cannot continue. Exiting dialogue.");
StartCoroutine(WaitBeforeExit());
}
}
private System.Collections.IEnumerator WaitBeforeExit()
{
Debug.Log("Waiting for user input to exit...");
yield return new WaitUntil(() => Input.GetKeyDown(KeyCode.Return)); // Wait for user input
Debug.Log("User input detected, exiting dialogue");
ExitDialogueMode();
}
}
https://redd.it/1i7orux
@r_Unity3D
if (currentStory.canContinue)
{
dialogueText.text = currentStory.Continue();
Debug.Log("Displaying line: " + dialogueText.text);
DisplayChoices();
}
else
{
Debug.Log("Exiting dialogue mode from ContinueStory.");
dialogueText.text = "Press Enter to exit the dialogue.";
StartCoroutine(WaitBeforeExit());
}
}
private void DisplayChoices()
{
List<Ink.Runtime.Choice> currentChoices = currentStory.currentChoices;
Debug.Log("Total choices available: " + currentChoices.Count); // Verify the number of choices
foreach (var choice in currentChoices)
{
Debug.Log("Choice: " + choice.text); // Print each choice text
}
int index = 0;
foreach (Ink.Runtime.Choice choice in currentChoices)
{
choices[index].gameObject.SetActive(true);
choicesText[index].text = choice.text;
Debug.Log($"Enabling choice button {index} with text: {choice.text}");
index++;
}
for (int i = index; i < choices.Length; i++)
{
Debug.Log($"Disabling unused choice button {i}");
choices[i].gameObject.SetActive(false);
}
StartCoroutine(SelectFirstChoice());
}
private System.Collections.IEnumerator SelectFirstChoice()
{
Debug.Log("Selecting the first choice button");
// Event System requires we clear it first, then Wait
// for at least one frame before setting the current selected game object
EventSystem.current.SetSelectedGameObject(null);
yield return new WaitForEndOfFrame();
EventSystem.current.SetSelectedGameObject(choices[0].gameObject);
}
public void MakeChoice(int choiceIndex)
{
Debug.Log($"MakeChoice called with index: {choiceIndex}");
currentStory.ChooseChoiceIndex(choiceIndex);
// Log current path in the Ink story
Debug.Log("After making a choice:");
Debug.Log("Current text: " + currentStory.currentText);
Debug.Log("Can continue: " + currentStory.canContinue);
Debug.Log("Choices available: " + currentStory.currentChoices.Count);
if (currentStory.canContinue)
{
Debug.Log("Story can continue. Calling ContinueStory.");
ContinueStory();
}
else
{
Debug.Log("Story cannot continue. Exiting dialogue.");
StartCoroutine(WaitBeforeExit());
}
}
private System.Collections.IEnumerator WaitBeforeExit()
{
Debug.Log("Waiting for user input to exit...");
yield return new WaitUntil(() => Input.GetKeyDown(KeyCode.Return)); // Wait for user input
Debug.Log("User input detected, exiting dialogue");
ExitDialogueMode();
}
}
https://redd.it/1i7orux
@r_Unity3D
Reddit
From the Unity2D community on Reddit: Story looping back issue with Ink
Explore this post and more from the Unity2D community
Why is this happening? I splice my player and it makes it HUGE?
So to get the pivot point at the bottom of the feet I always do this. Change to multiple then auto splice at bottom.
It has always worked until now. The player has a 5 PNG attack. Well PNG's 1-3 work fine.
But the last 2 are doing this: https://imgur.com/a/xDCYEX8
I have never seen this before and don't know how to fix or make it go away. Basically the red part I marked out is the actual PNG. But it seems to have made invisible spaces before and after.
So when the animation plays there are frames where you can't see anything. Very odd.
Anyone have any ideas?
The only workaround I could do is to not splice this attack and have all the pivot points be in the default center.
I could do this but IDK if it will cause problems in the future or not.
https://redd.it/1i7sfdm
@r_Unity3D
So to get the pivot point at the bottom of the feet I always do this. Change to multiple then auto splice at bottom.
It has always worked until now. The player has a 5 PNG attack. Well PNG's 1-3 work fine.
But the last 2 are doing this: https://imgur.com/a/xDCYEX8
I have never seen this before and don't know how to fix or make it go away. Basically the red part I marked out is the actual PNG. But it seems to have made invisible spaces before and after.
So when the animation plays there are frames where you can't see anything. Very odd.
Anyone have any ideas?
The only workaround I could do is to not splice this attack and have all the pivot points be in the default center.
I could do this but IDK if it will cause problems in the future or not.
https://redd.it/1i7sfdm
@r_Unity3D
Imgur
Discover the magic of the internet at Imgur, a community powered entertainment destination. Lift your spirits with funny jokes, trending memes, entertaining gifs, inspiring stories, viral videos, and so much more from users.
Why do my pixels render like this? (Using Cinemachine)
https://youtu.be/5811VzGaY_o
Why does my pixel art randomly stretch the pixels in animations? When viewing the sprites individually on the same character, the pixels are not stretched. The only thing the animations do is change the sprite, it doesn't change the scale or anything. Why is this happening?
My cameras are pixel perfect as well
https://redd.it/1i7snjf
@r_Unity3D
https://youtu.be/5811VzGaY_o
Why does my pixel art randomly stretch the pixels in animations? When viewing the sprites individually on the same character, the pixels are not stretched. The only thing the animations do is change the sprite, it doesn't change the scale or anything. Why is this happening?
My cameras are pixel perfect as well
https://redd.it/1i7snjf
@r_Unity3D
YouTube
Pixel Thingy
Why it like that though
When I splice my PNG it turns into an animation?? wtf?
Hey, so I my spicing on 1 single PNG is messing up. Its the same size and the 5th png in a sprite sheet. Well they are all separate PNGs that I combine to make animations.
Anyway, for some reason it keeps making this 5th PNG a freaking animation when I try to drag it into the scene.
I have no idea why. Its the same size resoultion/etc as all the other PNGS. Something is going wrong when I splice it.
Any ideas?
https://redd.it/1i7u6yi
@r_Unity3D
Hey, so I my spicing on 1 single PNG is messing up. Its the same size and the 5th png in a sprite sheet. Well they are all separate PNGs that I combine to make animations.
Anyway, for some reason it keeps making this 5th PNG a freaking animation when I try to drag it into the scene.
I have no idea why. Its the same size resoultion/etc as all the other PNGS. Something is going wrong when I splice it.
Any ideas?
https://redd.it/1i7u6yi
@r_Unity3D
Reddit
From the Unity2D community on Reddit
Explore this post and more from the Unity2D community
It jumps very fast
https://preview.redd.it/f3g6soki5oee1.png?width=1126&format=png&auto=webp&s=e70b40cbc289bd5d79ca98c6bdfbf773609447ee
I have a character that I’m making jump, but the jump happens way too fast and doesn’t look natural at all. How can I make the jump feel smoother and more realistic? (I have a video, but I couldn’t figure out how to upload it to Reddit yet! :)) Thanks in advance for any suggestions!
https://redd.it/1i7v5uy
@r_Unity3D
https://preview.redd.it/f3g6soki5oee1.png?width=1126&format=png&auto=webp&s=e70b40cbc289bd5d79ca98c6bdfbf773609447ee
I have a character that I’m making jump, but the jump happens way too fast and doesn’t look natural at all. How can I make the jump feel smoother and more realistic? (I have a video, but I couldn’t figure out how to upload it to Reddit yet! :)) Thanks in advance for any suggestions!
https://redd.it/1i7v5uy
@r_Unity3D
Media is too big
VIEW IN TELEGRAM
First time doing voice acting for my horror game feedback is needed
https://redd.it/1i7v1n7
@r_Unity3D
https://redd.it/1i7v1n7
@r_Unity3D
As a child, I always loved looking at the goods in kiosks—there were so many, and I dreamed of being a seller one day. Years later, I partially fulfilled that dream by creating a game. What do you think?
https://www.youtube.com/watch?v=Gvlp8MHFWjE
https://redd.it/1i7xj7h
@r_Unity3D
https://www.youtube.com/watch?v=Gvlp8MHFWjE
https://redd.it/1i7xj7h
@r_Unity3D
YouTube
Snow Town Geek Store — Announcement Trailer
Support the release of Snow Town Geek Store by adding the game to your Steam wishlist:
https://store.steampowered.com/app/3225880/Snow_Town_Geek_Store/
https://store.steampowered.com/app/3225880/Snow_Town_Geek_Store/
Media is too big
VIEW IN TELEGRAM
Sense Of Speed: Sense of Speed:
1. FOV change based on speed
2. Camera Shake at high speed
3. Motion Blur
4. Speed Lines
https://redd.it/1i7ygiu
@r_Unity3D
1. FOV change based on speed
2. Camera Shake at high speed
3. Motion Blur
4. Speed Lines
https://redd.it/1i7ygiu
@r_Unity3D
New visuals for my indie video game (made in Unity), what do you think?
https://redd.it/1i80059
@r_Unity3D
https://redd.it/1i80059
@r_Unity3D
Reddit
From the Unity2D community on Reddit: New visuals for my indie video game (made in Unity), what do you think?
Explore this post and more from the Unity2D community
This media is not supported in your browser
VIEW IN TELEGRAM
Any tips on how to pull off some Lighting like this wherein its night, but it isn't dark? [Game: Wuthering Waves]
https://redd.it/1i7yvbf
@r_Unity3D
https://redd.it/1i7yvbf
@r_Unity3D
Custom retro cartoon shader, full evolution from the original demo to the PlayStation build.
https://redd.it/1i80r09
@r_Unity3D
https://redd.it/1i80r09
@r_Unity3D
Scene transition not working properly
I made a scene transition using this video. The starting transition works, when i run it, it fades from a black screen but when i interact with a door that executes the transition and scene change, scene changes but it only fades into black. Shouldnt the animator start from "Entry" once it is a new scene?
My transition code is the same except i added code to check if its fully loaded and i made my scene loader dontdestroyonload
https://www.youtube.com/watch?v=CE9VOZivb3I
https://redd.it/1i83sgk
@r_Unity3D
I made a scene transition using this video. The starting transition works, when i run it, it fades from a black screen but when i interact with a door that executes the transition and scene change, scene changes but it only fades into black. Shouldnt the animator start from "Entry" once it is a new scene?
My transition code is the same except i added code to check if its fully loaded and i made my scene loader dontdestroyonload
https://www.youtube.com/watch?v=CE9VOZivb3I
https://redd.it/1i83sgk
@r_Unity3D
YouTube
How to make AWESOME Scene Transitions in Unity!
Transitions in Unity are easy to learn - let's have a look!
Get up to 91% OFF yearly plans using the code "BRACKEYS": https://www.hostinger.com/brackeys
● This video was inspired by: https://youtu.be/a0OQvWAPeuo
● Loading screen in Unity: https://you…
Get up to 91% OFF yearly plans using the code "BRACKEYS": https://www.hostinger.com/brackeys
● This video was inspired by: https://youtu.be/a0OQvWAPeuo
● Loading screen in Unity: https://you…