156
News about the Unity engine and project showcases from Reddit. Made possible with @reddit2telegram (@r_channels).
If you had to choose, which console era do you think this game is trying to replicate?
https://redd.it/1e8h5dc
@r_Unity3D
Unity Ad Initialization help
I am about to launch my game on the google play store, and I wasn't totally sure if my ad initialization script was done correctly. Please let me know if you spot any mistakes or things that I missed. Thank you. (I wrote "mykey" instead of my real key because I think it is not meant to be shared)
public class AdInitialization : MonoBehaviour
{
public AdRewardsSetUp adRewardsSetUp;
// Start is called before the first frame update
void Start()
{
IronSource.Agent.init("mykey", IronSourceAdUnits.REWARDED_VIDEO);
IronSource.Agent.validateIntegration();
IronSource.Agent.shouldTrackNetworkState (true);
//Add AdInfo Rewarded Video Events
IronSourceRewardedVideoEvents.onAdOpenedEvent += RewardedVideoOnAdOpenedEvent;
IronSourceRewardedVideoEvents.onAdClosedEvent += RewardedVideoOnAdClosedEvent;
IronSourceRewardedVideoEvents.onAdAvailableEvent += RewardedVideoOnAdAvailable;
IronSourceRewardedVideoEvents.onAdUnavailableEvent += RewardedVideoOnAdUnavailable;
IronSourceRewardedVideoEvents.onAdShowFailedEvent += RewardedVideoOnAdShowFailedEvent;
IronSourceRewardedVideoEvents.onAdRewardedEvent += RewardedVideoOnAdRewardedEvent;
IronSourceRewardedVideoEvents.onAdClickedEvent += RewardedVideoOnAdClickedEvent;
}
private void OnEnable() {
IronSourceEvents.onSdkInitializationCompletedEvent += SdkInitializationCompletedEvent;
}
void OnApplicationPause(bool isPaused) {
IronSource.Agent.onApplicationPause(isPaused);
}
public void ShowRewardedAd(){
if(!adRewardsSetUp.DisabledAds){
IronSource.Agent.showRewardedVideo();
}
}
private void SdkInitializationCompletedEvent(){}
/************* RewardedVideo AdInfo Delegates *************/
// Indicates that there’s an available ad.
// The adInfo object includes information about the ad that was loaded successfully
// This replaces the RewardedVideoAvailabilityChangedEvent(true) event
void RewardedVideoOnAdAvailable(IronSourceAdInfo adInfo) {
}
// Indicates that no ads are available to be displayed
// This replaces the RewardedVideoAvailabilityChangedEvent(false) event
void RewardedVideoOnAdUnavailable() {
}
// The Rewarded Video ad view has opened. Your activity will loose focus.
void RewardedVideoOnAdOpenedEvent(IronSourceAdInfo adInfo){
}
// The Rewarded Video ad view is about to be closed. Your activity will regain its focus.
void RewardedVideoOnAdClosedEvent(IronSourceAdInfo adInfo){
}
// The user completed to watch the video, and should be rewarded.
// The placement parameter will include the reward data.
// When using server-to-server callbacks, you may ignore this event and wait for the ironSource server callback.
void RewardedVideoOnAdRewardedEvent(IronSourcePlacement placement, IronSourceAdInfo adInfo){
adRewardsSetUp.StartAdEvent();
}
// The rewarded video ad was failed to show.
void RewardedVideoOnAdShowFailedEvent(IronSourceError error, IronSourceAdInfo adInfo){
adRewardsSetUp.ResetAdCurrent();
}
// Invoked when the video ad was clicked.
// This callback is not supported by all networks, and we recommend using it only if
// it’s supported by all networks you included in your build.
void RewardedVideoOnAdClickedEvent(IronSourcePlacement placement, IronSourceAdInfo adInfo){
}
public bool checkAvailability(){
return IronSource.Agent.isRewardedVideoAvailable();
}}
https://redd.it/1e8fdx5
@r_Unity3D
What do you think of the look of my game(early)
https://redd.it/1e86ujj
@r_Unity3D
Checking every door in my apartment with a rail-mounted camera. Just in case...
https://redd.it/1e7zl15
@r_Unity3D
Simplified Outline [Open Source]
https://redd.it/1e7stdh
@r_Unity3D
Custom physics cloth works pretty well I think!
https://redd.it/1e7thc2
@r_Unity3D
Launched my first game!
https://redd.it/1e7u3hj
@r_Unity3D
First prototype for my fighting game. What would you like to see for the improvement?
https://redd.it/1e7rke0
@r_Unity3D
Platformer tileMap water physics
Hello everybody, I'm working on a 2d platformer game similar to Terraria and using tileMap to generate a procedurally generated map. However I'm facing two issues that can't find any answer for them online.
_First, how to apply water physics for tileMap water tiles?
_Second, is there any simpler way to generate water in caves instead of using flood fill algorithm?
Thanks in advance for any given answer.
https://redd.it/1e7r45o
@r_Unity3D
Created a developer commentary trailer for my new game, Disposition
https://redd.it/1e7aoua
@r_Unity3D
Making a card management cooking game inspired by Stackland and Overcooked.
https://indieben.itch.io/culinarium
https://redd.it/1e7eqt4
@r_Unity3D
We just announced our sequel to Bloody Hell, using a combination of 2d sprites and 3d models
https://redd.it/1e7913s
@r_Unity3D
New Unity Discussions are live
https://redd.it/1e777o3
@r_Unity3D
What UI do you like the most A or B for a sci-fi game?
https://redd.it/1e74qjy
@r_Unity3D
How much event usage is too much? What are some situations in which people tend to use events unneccessarily?
NOTE: I am only using c# events, not Unity events
So the problem I am having is deciding when to use events and when to use direct references instead. Here are situations when I go for events:
When multiple different scripts of the same/different type need to run a code when a certain script performs a specific action (which is emitted as an event)
User Interface elements
The situation in which I am having trouble deciding is: let's say I have script A & script B now when a certain function is executed in A this function also needs to execute a certain function in B. Now the simplest solution is to use a direct reference in inspector or just using GetComponent in which case it introduces coupling plus makes it compulsory to declare that function public in B. Now the other solution is to have an event and invoke this event in A and have code in B to run whenever this event is invoked. The advantage is that this reduces coupling & restricts access but at the same time what I question myself is whether I am unnecessarily using events because there will only be one B script in the scene & that is the only script making use of the event. So is it an unnecessary usage of an event and should I just go with reference even if it introduces a little bit of coupling?
https://redd.it/1e8gil7
@r_Unity3D
Which one is the best way to write a line shorter ? ( If none then please comment the correct way )
https://redd.it/1e84sdy
@r_Unity3D
Trouble with your joints and/or curves? Don't worry, I can help with that! New neck traversal mechanic.
https://redd.it/1e822cw
@r_Unity3D
Character/prefab swap tutorial
Does anybody know any good tutorials about how to swap out 2 prefab player objects?
Example being for a mario game where you have normal mario with just a movement script but then the prefab for fire mario pops up and replaces the original when he touches a power up.
https://redd.it/1e7zug1
@r_Unity3D
What is your opinion on this top-down camera?
https://redd.it/1e7vw0m
@r_Unity3D
I want my forest to look like this, but the trees keep placing like this(2) while using tilemaps. How can i achieve this??
https://redd.it/1e7vidr
@r_Unity3D
Check this out! Optimized or Fake Rope or cable simulation tool.
https://redd.it/1e7rutc
@r_Unity3D
An optimized rope or cable simulation tool. Kind of fake rope physics simulation.
https://redd.it/1e7rtuy
@r_Unity3D
Trying to fully utilize Unity animation and particle systems in our game: here’s a mini-boss fight with special animated projectiles, proximity mines, homing rockets, and more.
https://redd.it/1e7pum0
@r_Unity3D
Interactive grass: next iteration
https://redd.it/1e77wif
@r_Unity3D
Looking for feedback for game dev-centered pixel art editor
https://redd.it/1e7i87n
@r_Unity3D
Unity 2D More Precise Default PolygonCollider2D
How do i make the polygon collider 2D have closer points to the outline that i see in the editor when i select a sprite.
https://preview.redd.it/s9e17nx5xidd1.png?width=1418&format=png&auto=webp&s=2a467f38e63eb029c46c21bf8caf6f18bfc22f05
In the image you can see that the red outline is from the editor window when i select the gameobject with the sprite renderer and the green outline is the default Polygon Collider 2D outline when i add it. I dont want to edit individual polygon colliders manually because it would take at least 10 hours for the amount of objects i have.
Thanks for any help.
https://redd.it/1e7bmos
@r_Unity3D
Probably a tale as old as time, but we're having a lot of issues with Unity breaking the appearance of Pixel Art in our game (Settings in the fourth image). Any insight?
https://redd.it/1e6zmth
@r_Unity3D
Did Unity really just break all their old forum posts?
One of the best things about Unity is that googling any issue gives you almost instant answers from forums, generated over many years. This is better and more effective than any documentation. They just broke all old posts without having them redirect to a copy or archive of it. I saw Unreal do this and become so much harder to work with... how can they be so ignorant?
https://redd.it/1e7696c
@r_Unity3D
Here is the before and after how we improved our game in three months!
https://redd.it/1e73cq0
@r_Unity3D