<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>script Archives - Oxmond Technology</title>
	<atom:link href="https://oxmond.com/tag/script/feed/" rel="self" type="application/rss+xml" />
	<link>https://oxmond.com</link>
	<description>IT Development</description>
	<lastBuildDate>Wed, 18 Nov 2020 04:21:10 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.0</generator>
	<item>
		<title>How to Change Scene in Unity</title>
		<link>https://oxmond.com/how-to-change-scene-in-unity/</link>
					<comments>https://oxmond.com/how-to-change-scene-in-unity/#respond</comments>
		
		<dc:creator><![CDATA[Oxmond Technology]]></dc:creator>
		<pubDate>Tue, 27 Aug 2019 11:09:08 +0000</pubDate>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Unity]]></category>
		<category><![CDATA[2019]]></category>
		<category><![CDATA[2D]]></category>
		<category><![CDATA[between]]></category>
		<category><![CDATA[button]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[change]]></category>
		<category><![CDATA[change level]]></category>
		<category><![CDATA[change scene]]></category>
		<category><![CDATA[change scene script]]></category>
		<category><![CDATA[click]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[coding pirates]]></category>
		<category><![CDATA[collision]]></category>
		<category><![CDATA[delay]]></category>
		<category><![CDATA[Hans Oxmond]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[How to Change Scene in Unity]]></category>
		<category><![CDATA[learn]]></category>
		<category><![CDATA[lesson]]></category>
		<category><![CDATA[level]]></category>
		<category><![CDATA[load]]></category>
		<category><![CDATA[manager]]></category>
		<category><![CDATA[multiple]]></category>
		<category><![CDATA[new]]></category>
		<category><![CDATA[next]]></category>
		<category><![CDATA[on button press]]></category>
		<category><![CDATA[Oxmond Unity Tutorials]]></category>
		<category><![CDATA[parameters]]></category>
		<category><![CDATA[press]]></category>
		<category><![CDATA[scene]]></category>
		<category><![CDATA[scene manager]]></category>
		<category><![CDATA[scene transition]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[switch]]></category>
		<category><![CDATA[switch between scenes]]></category>
		<category><![CDATA[switch scene]]></category>
		<category><![CDATA[tip]]></category>
		<category><![CDATA[transition]]></category>
		<category><![CDATA[trigger]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[Unity3d]]></category>
		<category><![CDATA[video games]]></category>
		<guid isPermaLink="false">https://oxmond.com/?p=554</guid>

					<description><![CDATA[<p>How to change scene in Unity! In this tutorial we cover four different scenarios on how to switch scenes: Change Scene on Button Press Change Scene on Collision Switch scenes after time (delay) How to Change Level (scene) AND Keep Your Variables ❤️ Subscribe to...</p>
<p>The post <a rel="nofollow" href="https://oxmond.com/how-to-change-scene-in-unity/">How to Change Scene in Unity</a> appeared first on <a rel="nofollow" href="https://oxmond.com">Oxmond Technology</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>How to change scene in Unity! In this tutorial we cover four different scenarios on how to switch scenes:</strong></p>
<ol>
<li><span style="font-weight: 400;">Change Scene on Button Press</span></li>
<li><span style="font-weight: 400;"> Change Scene on Collision</span></li>
<li><span style="font-weight: 400;"> Switch scenes after time (delay)</span></li>
<li><span style="font-weight: 400;"> How to Change Level (scene) AND Keep Your Variables </span><span style="font-weight: 400;"><br />
</span></li>
</ol>
<hr />
<p><span style="font-weight: 400;">❤️ <strong>Subscribe to Oxmond Tutorials. Stay ahead af the game!</strong></span><br />
<a href="https://bit.ly/SubscribeOxmondTutorials"><span style="font-weight: 400;">https://bit.ly/SubscribeOxmondTutorials</span></a></p>
<p><span style="font-weight: 400;">✅ <strong>Download the free DOTweeen tool here:</strong></span><br />
<a href="https://assetstore.unity.com/packages/tools/animation/dotween-hotween-v2-27676?aid=1100l4p9k"><span style="font-weight: 400;">https://assetstore.unity.com/packages/tools/animation/dotween-hotween-v2-27676?aid=1100l4p9k</span></a></p>
<p><span style="font-weight: 400;">✅ <strong>Free Assets from the Unity Assets Store:<br />
</strong></span><a href="https://assetstore.unity.com/lists/top-free-packages-13201?aid=1100l4p9k"><span style="font-weight: 400;">https://assetstore.unity.com/lists/top-free-packages-13201?aid=1100l4p9k </span></a></p>
<p>😷👕 <strong>Need a face mask / developer T-shirt? Drop by our shop and get a 20% DISCOUNT on your first purchase by using the discount code OXMONDSALE. Click here:</strong><br />
<a href="https://shop.oxmond.com/discount/OXMONDSALE">https://shop.oxmond.com/discount/OXMONDSALE</a></p>
<hr />
<p><strong><br />
The button script:</strong></p>
<pre>/*

   .-------.                             .--.    .-------.     .--.            .--.     .--.        
   |       |--.--.--------.-----.-----.--|  |    |_     _|--.--|  |_.-----.----|__|---.-|  |-----.
   |   -   |_   _|        |  _  |     |  _  |      |   | |  |  |   _|  _  |   _|  |  _  |  |__ --|
   |_______|__.__|__|__|__|_____|__|__|_____|      |___| |_____|____|_____|__| |__|___._|__|_____|
   © 2019 OXMOND / www.oxmond.com 

*/

using UnityEngine;
using UnityEngine.SceneManagement;

public class BtnClick : MonoBehaviour
{
    public void BtnNewScene()
    {
        PlayerPrefs.SetInt("score", 2500);
        SceneManager.LoadScene("Scene 2");
    }

}
</pre>
<hr />
<p><strong><br />
The Ball Collision Script:</strong></p>
<pre>/*

   .-------.                             .--.    .-------.     .--.            .--.     .--.        
   |       |--.--.--------.-----.-----.--|  |    |_     _|--.--|  |_.-----.----|__|---.-|  |-----.
   |   -   |_   _|        |  _  |     |  _  |      |   | |  |  |   _|  _  |   _|  |  _  |  |__ --|
   |_______|__.__|__|__|__|_____|__|__|_____|      |___| |_____|____|_____|__| |__|___._|__|_____|
   © 2019 OXMOND / www.oxmond.com 

*/

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;

public class BallCollision : MonoBehaviour
{
    private void OnCollisionEnter2D(Collision2D collision)
    {
        if (collision.gameObject.name == "Ball Red") {
            SceneManager.LoadScene("Scene 2");
        }
    }
}
</pre>
<hr />
<p><strong><br />
The Delay Script:</strong></p>
<pre>/*

   .-------.                             .--.    .-------.     .--.            .--.     .--.        
   |       |--.--.--------.-----.-----.--|  |    |_     _|--.--|  |_.-----.----|__|---.-|  |-----.
   |   -   |_   _|        |  _  |     |  _  |      |   | |  |  |   _|  _  |   _|  |  _  |  |__ --|
   |_______|__.__|__|__|__|_____|__|__|_____|      |___| |_____|____|_____|__| |__|___._|__|_____|
   © 2019 OXMOND / www.oxmond.com 

*/

using UnityEngine;
using DG.Tweening;
using UnityEngine.SceneManagement;

public class Delay : MonoBehaviour
{
    void Start()
    {
        DOVirtual.DelayedCall(3, GotoNextScene);
    }

    void GotoNextScene()
    {
        SceneManager.LoadScene("Scene 2");
    }
}

</pre>
<hr />
<p><strong><br />
The Load Variable (Scene 2) Script:</strong></p>
<pre>/*

   .-------.                             .--.    .-------.     .--.            .--.     .--.        
   |       |--.--.--------.-----.-----.--|  |    |_     _|--.--|  |_.-----.----|__|---.-|  |-----.
   |   -   |_   _|        |  _  |     |  _  |      |   | |  |  |   _|  _  |   _|  |  _  |  |__ --|
   |_______|__.__|__|__|__|_____|__|__|_____|      |___| |_____|____|_____|__| |__|___._|__|_____|
   © 2019 OXMOND / www.oxmond.com 

*/

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TMPro;

public class Scene2 : MonoBehaviour
{

    public TextMeshPro scoreText;

    void Start()
    {
        scoreText.text = "Score: " + PlayerPrefs.GetInt("score").ToString();
    }

}

</pre>
<p>The post <a rel="nofollow" href="https://oxmond.com/how-to-change-scene-in-unity/">How to Change Scene in Unity</a> appeared first on <a rel="nofollow" href="https://oxmond.com">Oxmond Technology</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://oxmond.com/how-to-change-scene-in-unity/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Changing Color of Gameobject Over a Period of Time</title>
		<link>https://oxmond.com/changing-color-of-gameobject-over-a-period-of-time/</link>
					<comments>https://oxmond.com/changing-color-of-gameobject-over-a-period-of-time/#comments</comments>
		
		<dc:creator><![CDATA[Oxmond Technology]]></dc:creator>
		<pubDate>Fri, 23 Aug 2019 16:00:44 +0000</pubDate>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Unity]]></category>
		<category><![CDATA[2019]]></category>
		<category><![CDATA[3D]]></category>
		<category><![CDATA[animate]]></category>
		<category><![CDATA[at runtime]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[change]]></category>
		<category><![CDATA[Changing Color of Gameobject Over a Period of Time]]></category>
		<category><![CDATA[coding pirates]]></category>
		<category><![CDATA[color]]></category>
		<category><![CDATA[color change script]]></category>
		<category><![CDATA[color.black]]></category>
		<category><![CDATA[color.green]]></category>
		<category><![CDATA[color.lerp]]></category>
		<category><![CDATA[color.red]]></category>
		<category><![CDATA[color.white]]></category>
		<category><![CDATA[dynamically]]></category>
		<category><![CDATA[fade]]></category>
		<category><![CDATA[gameobject]]></category>
		<category><![CDATA[gradually]]></category>
		<category><![CDATA[Hans Oxmond]]></category>
		<category><![CDATA[hex]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[Intermediate Tutorial Unity 2019]]></category>
		<category><![CDATA[learn]]></category>
		<category><![CDATA[lesson]]></category>
		<category><![CDATA[material]]></category>
		<category><![CDATA[object]]></category>
		<category><![CDATA[on-the-fly]]></category>
		<category><![CDATA[one color to another]]></category>
		<category><![CDATA[over time]]></category>
		<category><![CDATA[Oxmond Unity Tutorials]]></category>
		<category><![CDATA[period]]></category>
		<category><![CDATA[properties]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[shader]]></category>
		<category><![CDATA[time]]></category>
		<category><![CDATA[tip]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[tween]]></category>
		<category><![CDATA[Unity3d]]></category>
		<category><![CDATA[video games]]></category>
		<guid isPermaLink="false">https://oxmond.com/?p=536</guid>

					<description><![CDATA[<p>This Unity tutorial show how to change/fade/animate colors over time. ❤️ Subscribe to Oxmond Tutorials. We upload new tutorials every day! https://bit.ly/SubscribeOxmondTutorials ✅ Download the free Nefertiti 3D statue here: https://assetstore.unity.com/packages/3d/nefertiti-56818?aid=1100l4p9k ✅ Download the free DOTween here: https://assetstore.unity.com/packages/tools/animation/dotween-hotween-v2-27676?aid=1100l4p9k ✅ Other Free Assets from the Unity...</p>
<p>The post <a rel="nofollow" href="https://oxmond.com/changing-color-of-gameobject-over-a-period-of-time/">Changing Color of Gameobject Over a Period of Time</a> appeared first on <a rel="nofollow" href="https://oxmond.com">Oxmond Technology</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>This Unity tutorial show how to change/fade/animate colors over time.</p>
<hr />
<p>❤️ Subscribe to Oxmond Tutorials. We upload new tutorials every day!<br />
<a href="https://bit.ly/SubscribeOxmondTutorials">https://bit.ly/SubscribeOxmondTutorials</a></p>
<p>✅ Download the free Nefertiti 3D statue here:<br />
<a href="https://assetstore.unity.com/packages/3d/nefertiti-56818?aid=1100l4p9k">https://assetstore.unity.com/packages/3d/nefertiti-56818?aid=1100l4p9k</a></p>
<p>✅ Download the free DOTween here:<br />
<a href="https://assetstore.unity.com/packages/tools/animation/dotween-hotween-v2-27676?aid=1100l4p9k">https://assetstore.unity.com/packages/tools/animation/dotween-hotween-v2-27676?aid=1100l4p9k</a></p>
<p>✅ Other Free Assets from the Unity Assets Store:<br />
<a href="https://assetstore.unity.com/lists/top-free-packages-13201?aid=1100l4p9k">https://assetstore.unity.com/lists/top-free-packages-13201?aid=1100l4p9k</a></p>
<p>😷👕 Need a face mask / developer T-shirt? Drop by our shop and get a 20% DISCOUNT on your first purchase by using the discount code OXMONDSALE. Click here:<br />
<a href="https://shop.oxmond.com/discount/OXMONDSALE">https://shop.oxmond.com/discount/OXMONDSALE</a></p>
<hr />
<p><strong>Set the color script:</strong></p>
<pre>/*

   .-------.                             .--.    .-------.     .--.            .--.     .--.        
   |       |--.--.--------.-----.-----.--|  |    |_     _|--.--|  |_.-----.----|__|---.-|  |-----.
   |   -   |_   _|        |  _  |     |  _  |      |   | |  |  |   _|  _  |   _|  |  _  |  |__ --|
   |_______|__.__|__|__|__|_____|__|__|_____|      |___| |_____|____|_____|__| |__|___._|__|_____|
   © 2019 OXMOND / www.oxmond.com 

*/

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using DG.Tweening;

public class ChangeColor : MonoBehaviour
{

    public Material nMaterial;

    public void SetColorToBlack() {
        nMaterial.SetColor("_Color", Color.black);
    }

    public void SetColorToWhite()
    {
        nMaterial.SetColor("_Color", Color.white);
    }

    public void SetColorToRed()
    {
        nMaterial.SetColor("_Color", Color.red);
    }

    public void SetColorToGreen()
    {
        nMaterial.SetColor("_Color", Color.green);
    }


}
</pre>
<hr />
<p><strong>Fade the color using DOTween:</strong></p>
<pre>/*

   .-------.                             .--.    .-------.     .--.            .--.     .--.        
   |       |--.--.--------.-----.-----.--|  |    |_     _|--.--|  |_.-----.----|__|---.-|  |-----.
   |   -   |_   _|        |  _  |     |  _  |      |   | |  |  |   _|  _  |   _|  |  _  |  |__ --|
   |_______|__.__|__|__|__|_____|__|__|_____|      |___| |_____|____|_____|__| |__|___._|__|_____|
   © 2019 OXMOND / www.oxmond.com 

*/

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using DG.Tweening;

public class ChangeColor : MonoBehaviour
{
    public Material nMaterial;

    public void SetColorToBlack() {
        nMaterial.DOColor(Color.black, 2);
    }

    public void SetColorToWhite()
    {
        nMaterial.DOColor(Color.white, 2);
    }

    public void SetColorToRed()
    {
        nMaterial.DOColor(Color.red, 2);
    }

    public void SetColorToGreen()
    {
        nMaterial.DOColor(Color.green, 2);
    }
}
</pre>
<p>The post <a rel="nofollow" href="https://oxmond.com/changing-color-of-gameobject-over-a-period-of-time/">Changing Color of Gameobject Over a Period of Time</a> appeared first on <a rel="nofollow" href="https://oxmond.com">Oxmond Technology</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://oxmond.com/changing-color-of-gameobject-over-a-period-of-time/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>How To Create a Perfect Bouncing Ball</title>
		<link>https://oxmond.com/how-to-create-a-perfect-bouncing-ball/</link>
					<comments>https://oxmond.com/how-to-create-a-perfect-bouncing-ball/#respond</comments>
		
		<dc:creator><![CDATA[Oxmond Technology]]></dc:creator>
		<pubDate>Thu, 22 Aug 2019 16:25:45 +0000</pubDate>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Unity]]></category>
		<category><![CDATA[2019]]></category>
		<category><![CDATA[2D]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[ball]]></category>
		<category><![CDATA[beginner]]></category>
		<category><![CDATA[bouncing]]></category>
		<category><![CDATA[bouncy]]></category>
		<category><![CDATA[coding pirates]]></category>
		<category><![CDATA[collision]]></category>
		<category><![CDATA[constant]]></category>
		<category><![CDATA[create]]></category>
		<category><![CDATA[demo]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[effect]]></category>
		<category><![CDATA[essentials]]></category>
		<category><![CDATA[falling]]></category>
		<category><![CDATA[football]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[game development]]></category>
		<category><![CDATA[Hans Oxmond]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[How To Create a Perfect Bouncing Ball]]></category>
		<category><![CDATA[jump]]></category>
		<category><![CDATA[learn]]></category>
		<category><![CDATA[learning]]></category>
		<category><![CDATA[movement]]></category>
		<category><![CDATA[object]]></category>
		<category><![CDATA[Oxmond Unity Tutorials]]></category>
		<category><![CDATA[perfect bounce]]></category>
		<category><![CDATA[physics]]></category>
		<category><![CDATA[rigidbody]]></category>
		<category><![CDATA[rigidbody 2D]]></category>
		<category><![CDATA[rubber ball]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[tip]]></category>
		<category><![CDATA[tricks]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[Unity3d]]></category>
		<category><![CDATA[video games]]></category>
		<category><![CDATA[wall]]></category>
		<guid isPermaLink="false">https://oxmond.com/?p=532</guid>

					<description><![CDATA[<p>In this Unity tutorial we create a bouncing ball that keeps a constant jumping height. ❤️ Subscribe to Oxmond Tutorials. Stay ahead of the game! https://bit.ly/SubscribeOxmondTutorials ✅ Download the free background used in the tutorial here: https://assetstore.unity.com/packages/2d/environments/free-2d-adventure-beach-background-82090?aid=1100l4p9k ✅ Other Free Assets from the Unity Assets...</p>
<p>The post <a rel="nofollow" href="https://oxmond.com/how-to-create-a-perfect-bouncing-ball/">How To Create a Perfect Bouncing Ball</a> appeared first on <a rel="nofollow" href="https://oxmond.com">Oxmond Technology</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>In this Unity tutorial we create a bouncing ball that keeps a constant jumping height.</p>
<hr />
<p>❤️ Subscribe to Oxmond Tutorials. Stay ahead of the game!<br />
<a href="https://bit.ly/SubscribeOxmondTutorials">https://bit.ly/SubscribeOxmondTutorials</a></p>
<p>✅ Download the free background used in the tutorial here:<br />
<a href="https://assetstore.unity.com/packages/2d/environments/free-2d-adventure-beach-background-82090?aid=1100l4p9k">https://assetstore.unity.com/packages/2d/environments/free-2d-adventure-beach-background-82090?aid=1100l4p9k</a></p>
<p>✅ Other Free Assets from the Unity Assets Store:<br />
<a href="https://assetstore.unity.com/lists/top-free-packages-13201?aid=1100l4p9k">https://assetstore.unity.com/lists/top-free-packages-13201?aid=1100l4p9k</a></p>
<p>😷👕 Need a face mask / developer T-shirt? Drop by our shop and get a 20% DISCOUNT on your first purchase by using the discount code OXMONDSALE. Click here:<br />
<a href="https://shop.oxmond.com/discount/OXMONDSALE">https://shop.oxmond.com/discount/OXMONDSALE</a></p>
<p>&nbsp;</p>
<p>The post <a rel="nofollow" href="https://oxmond.com/how-to-create-a-perfect-bouncing-ball/">How To Create a Perfect Bouncing Ball</a> appeared first on <a rel="nofollow" href="https://oxmond.com">Oxmond Technology</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://oxmond.com/how-to-create-a-perfect-bouncing-ball/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How To Drag and Drop a 2D Object</title>
		<link>https://oxmond.com/how-to-drag-and-drop-a-2d-object/</link>
					<comments>https://oxmond.com/how-to-drag-and-drop-a-2d-object/#comments</comments>
		
		<dc:creator><![CDATA[Oxmond Technology]]></dc:creator>
		<pubDate>Sun, 18 Aug 2019 19:32:12 +0000</pubDate>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Unity]]></category>
		<category><![CDATA[2D]]></category>
		<category><![CDATA[Beginner Tutorial - Unity 2019]]></category>
		<category><![CDATA[coding pirates]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[drag]]></category>
		<category><![CDATA[drag and drop]]></category>
		<category><![CDATA[drag and drop example]]></category>
		<category><![CDATA[drag gameobject with mouse]]></category>
		<category><![CDATA[drop]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[free lesson]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[game object]]></category>
		<category><![CDATA[gameobject]]></category>
		<category><![CDATA[Hans Oxmond]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[instruction]]></category>
		<category><![CDATA[learn]]></category>
		<category><![CDATA[mouse]]></category>
		<category><![CDATA[object]]></category>
		<category><![CDATA[Oxmond Unity Tutorials]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[sprite]]></category>
		<category><![CDATA[target]]></category>
		<category><![CDATA[tip]]></category>
		<category><![CDATA[trick]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[unity 2019]]></category>
		<category><![CDATA[Unity3d]]></category>
		<category><![CDATA[video games]]></category>
		<guid isPermaLink="false">https://oxmond.com/?p=501</guid>

					<description><![CDATA[<p>Learn how to drag a 2D object with the mouse. In this tutorial we will create at general drag and drop script you can use on any sprite.  ❤️ Subscribe to Oxmond Tutorials. Stay ahead of the game: https://bit.ly/SubscribeOxmondTutorials ✅ Download the free Japanese Dishes...</p>
<p>The post <a rel="nofollow" href="https://oxmond.com/how-to-drag-and-drop-a-2d-object/">How To Drag and Drop a 2D Object</a> appeared first on <a rel="nofollow" href="https://oxmond.com">Oxmond Technology</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><span style="font-weight: 400;">Learn how to drag a 2D object with the mouse. In this tutorial we will create at general drag and drop script you can use on any sprite. </span></p>
<hr />
<p><span style="font-weight: 400;">❤️ <strong>Subscribe to Oxmond Tutorials. Stay ahead of the game:</strong></span><span style="font-weight: 400;"><br />
</span><a href="https://bit.ly/SubscribeOxmondTutorials"><span style="font-weight: 400;">https://bit.ly/SubscribeOxmondTutorials</span></a></p>
<p><span style="font-weight: 400;"> ✅ <strong>Download the free Japanese Dishes sprites here:</strong></span><span style="font-weight: 400;"><br />
</span><a href="https://assetstore.unity.com/packages/2d/textures-materials/food/japanese-dishes-82383?aid=1100l4p9k"><span style="font-weight: 400;">https://assetstore.unity.com/packages/2d/textures-materials/food/japanese-dishes-82383?aid=1100l4p9k </span></a></p>
<p><span style="font-weight: 400;"><strong>✅ Other Free Assets in the Unity Assets Store:<br />
</strong></span><a href="https://assetstore.unity.com/lists/top-free-packages-13201?aid=1100l4p9k"><span style="font-weight: 400;">https://assetstore.unity.com/lists/top-free-packages-13201?aid=1100l4p9k </span></a></p>
<p>😷👕 <strong>Need a face mask / developer T-shirt? Drop by our shop and get a 20% DISCOUNT on your first purchase by using the discount code OXMONDSALE. Click here:</strong><br />
<a href="https://shop.oxmond.com/discount/OXMONDSALE">https://shop.oxmond.com/discount/OXMONDSALE</a></p>
<hr />
<p><strong>The DragAndDrop script:</strong></p>
<pre>/*
   .-------.                             .--.    .-------.     .--.            .--.     .--.        
   |       |--.--.--------.-----.-----.--|  |    |_     _|--.--|  |_.-----.----|__|---.-|  |-----.
   |   -   |_   _|        |  _  |     |  _  |      |   | |  |  |   _|  _  |   _|  |  _  |  |__ --|
   |_______|__.__|__|__|__|_____|__|__|_____|      |___| |_____|____|_____|__| |__|___._|__|_____|
   © 2019 OXMOND / www.oxmond.com 
*/

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class DragAndDrop : MonoBehaviour
{

    private bool isDragging;

    public void OnMouseDown()
    {
        isDragging = true;
    }

    public void OnMouseUp()
    {
        isDragging = false;
    }

    void Update()
    {
        if (isDragging) {
            Vector2 mousePosition = Camera.main.ScreenToWorldPoint(Input.mousePosition) - transform.position;
            transform.Translate(mousePosition);
        }
    }
}
</pre>
<p>The post <a rel="nofollow" href="https://oxmond.com/how-to-drag-and-drop-a-2d-object/">How To Drag and Drop a 2D Object</a> appeared first on <a rel="nofollow" href="https://oxmond.com">Oxmond Technology</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://oxmond.com/how-to-drag-and-drop-a-2d-object/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
	</channel>
</rss>
