<?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>string Archives - Oxmond Technology</title>
	<atom:link href="https://oxmond.com/tag/string/feed/" rel="self" type="application/rss+xml" />
	<link>https://oxmond.com</link>
	<description>IT Development</description>
	<lastBuildDate>Wed, 18 Nov 2020 04:19:55 +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>C# Lesson: How To Save &#038; Load Game Data on a Local Device</title>
		<link>https://oxmond.com/c-lesson-how-to-save-load-game-data-on-local-device/</link>
					<comments>https://oxmond.com/c-lesson-how-to-save-load-game-data-on-local-device/#respond</comments>
		
		<dc:creator><![CDATA[Oxmond Technology]]></dc:creator>
		<pubDate>Sun, 25 Aug 2019 04:55:35 +0000</pubDate>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Unity]]></category>
		<category><![CDATA[2019]]></category>
		<category><![CDATA[between]]></category>
		<category><![CDATA[between scenes]]></category>
		<category><![CDATA[coding pirates]]></category>
		<category><![CDATA[counter]]></category>
		<category><![CDATA[data]]></category>
		<category><![CDATA[device]]></category>
		<category><![CDATA[display]]></category>
		<category><![CDATA[easy]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[float]]></category>
		<category><![CDATA[gamedata]]></category>
		<category><![CDATA[Hans Oxmond]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[integer]]></category>
		<category><![CDATA[Intermediate Tutorial Unity 2019]]></category>
		<category><![CDATA[learn]]></category>
		<category><![CDATA[lesson]]></category>
		<category><![CDATA[load]]></category>
		<category><![CDATA[local]]></category>
		<category><![CDATA[mastering]]></category>
		<category><![CDATA[name]]></category>
		<category><![CDATA[Oxmond Unity Tutorials]]></category>
		<category><![CDATA[playerprefs]]></category>
		<category><![CDATA[save]]></category>
		<category><![CDATA[Save & Load Game Data on Local Device]]></category>
		<category><![CDATA[save data]]></category>
		<category><![CDATA[save write and load from file]]></category>
		<category><![CDATA[scenes]]></category>
		<category><![CDATA[score]]></category>
		<category><![CDATA[state]]></category>
		<category><![CDATA[store]]></category>
		<category><![CDATA[string]]></category>
		<category><![CDATA[system]]></category>
		<category><![CDATA[tip]]></category>
		<category><![CDATA[Unity3d]]></category>
		<category><![CDATA[variables]]></category>
		<category><![CDATA[video games]]></category>
		<category><![CDATA[write]]></category>
		<guid isPermaLink="false">https://oxmond.com/?p=542</guid>

					<description><![CDATA[<p>Save data like username and score on a local device using PlayerPrefs. You can save strings, integers and floats. A basic example would look something like this: Save: PlayerPrefs.SetString(&#8220;playerName&#8221;, &#8220;Oxmond&#8221;); Load: PlayerPrefs.GetString(&#8220;playerName&#8221;); ❤️ Subscribe to Oxmond Tutorials. Stay ahead of the game! https://bit.ly/SubscribeOxmondTutorials ✅ Free Assets...</p>
<p>The post <a rel="nofollow" href="https://oxmond.com/c-lesson-how-to-save-load-game-data-on-local-device/">C# Lesson: How To Save &#038; Load Game Data on a Local Device</a> appeared first on <a rel="nofollow" href="https://oxmond.com">Oxmond Technology</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Save data like username and score on a local device using PlayerPrefs. You can save strings, integers and floats. A basic example would look something like this:</p>
<p>Save:<br />
PlayerPrefs.SetString(&#8220;playerName&#8221;, &#8220;Oxmond&#8221;);</p>
<p>Load:<br />
PlayerPrefs.GetString(&#8220;playerName&#8221;);</p>
<hr />
<p>❤️<strong> Subscribe to Oxmond Tutorials. Stay ahead of the game!</strong><br />
<a href="https://bit.ly/SubscribeOxmondTutorials">https://bit.ly/SubscribeOxmondTutorials</a></p>
<p>✅<strong> Free Assets from the Unity Assets Store:</strong><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>Basic SaveAndLoadData script:</strong></p>
<pre>/*

   .-------.                             .--.    .-------.     .--.            .--.     .--.        
   |       |--.--.--------.-----.-----.--|  |    |_     _|--.--|  |_.-----.----|__|---.-|  |-----.
   |   -   |_   _|        |  _  |     |  _  |      |   | |  |  |   _|  _  |   _|  |  _  |  |__ --|
   |_______|__.__|__|__|__|_____|__|__|_____|      |___| |_____|____|_____|__| |__|___._|__|_____|
   © 2019 OXMOND / www.oxmond.com 

*/
using UnityEngine;

public class SaveAndLoadData : MonoBehaviour
{

public void SaveData() {
PlayerPrefs.SetString("playerName", "Oxmond");
PlayerPrefs.SetInt("Score", 2000));
}

public void LoadData()
{
string _userName = PlayerPrefs.GetString("playerName");
int _score = PlayerPrefs.GetInt("Score");
}

}
</pre>
<hr />
<p><strong>SaveAndLoadData script used in the video:</strong></p>
<pre>/*

   .-------.                             .--.    .-------.     .--.            .--.     .--.        
   |       |--.--.--------.-----.-----.--|  |    |_     _|--.--|  |_.-----.----|__|---.-|  |-----.
   |   -   |_   _|        |  _  |     |  _  |      |   | |  |  |   _|  _  |   _|  |  _  |  |__ --|
   |_______|__.__|__|__|__|_____|__|__|_____|      |___| |_____|____|_____|__| |__|___._|__|_____|
   © 2019 OXMOND / www.oxmond.com 

*/

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TMPro;

public class SaveAndLoadData : MonoBehaviour
{

public TMP_InputField userName;
public TMP_InputField score;
public TMP_Text output;

public void SaveData() {
PlayerPrefs.SetString("playerName", userName.text);
PlayerPrefs.SetInt("Score", int.Parse(score.text));
}

public void LoadData()
{
print(PlayerPrefs.GetString("playerName"));
output.text = "Name: " + PlayerPrefs.GetString("playerName") + "
" +"Score: " + PlayerPrefs.GetInt("Score").ToString();
}

}
</pre>
<p>The post <a rel="nofollow" href="https://oxmond.com/c-lesson-how-to-save-load-game-data-on-local-device/">C# Lesson: How To Save &#038; Load Game Data on a Local Device</a> appeared first on <a rel="nofollow" href="https://oxmond.com">Oxmond Technology</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://oxmond.com/c-lesson-how-to-save-load-game-data-on-local-device/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How To Generate a Random Number or a Random String</title>
		<link>https://oxmond.com/how-to-generate-a-random-number-or-a-random-string/</link>
					<comments>https://oxmond.com/how-to-generate-a-random-number-or-a-random-string/#comments</comments>
		
		<dc:creator><![CDATA[Oxmond Technology]]></dc:creator>
		<pubDate>Tue, 20 Aug 2019 17:19:09 +0000</pubDate>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Unity]]></category>
		<category><![CDATA[2019]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[coding pirates]]></category>
		<category><![CDATA[element]]></category>
		<category><![CDATA[generate]]></category>
		<category><![CDATA[generator]]></category>
		<category><![CDATA[get number]]></category>
		<category><![CDATA[getting random element from list]]></category>
		<category><![CDATA[Hans Oxmond]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[How To Generate a Random Number or a Random String]]></category>
		<category><![CDATA[how to make a random number generator]]></category>
		<category><![CDATA[int]]></category>
		<category><![CDATA[Intermediate Tutorial Unity 2019]]></category>
		<category><![CDATA[learn]]></category>
		<category><![CDATA[list]]></category>
		<category><![CDATA[make it random]]></category>
		<category><![CDATA[mastering]]></category>
		<category><![CDATA[number]]></category>
		<category><![CDATA[Oxmond Unity Tutorials]]></category>
		<category><![CDATA[random]]></category>
		<category><![CDATA[random int]]></category>
		<category><![CDATA[random name from list]]></category>
		<category><![CDATA[random number generator]]></category>
		<category><![CDATA[random.range]]></category>
		<category><![CDATA[string]]></category>
		<category><![CDATA[tip]]></category>
		<category><![CDATA[tricks]]></category>
		<category><![CDATA[Unity3d]]></category>
		<category><![CDATA[video games]]></category>
		<guid isPermaLink="false">https://oxmond.com/?p=518</guid>

					<description><![CDATA[<p>How to work with date and time. In this tutorial we&#8217;ll work with the system datetime. How to get it, and how to format it.  ❤️ Subscribe to Oxmond Tutorials. We upload new videos every day! https://bit.ly/SubscribeOxmondTutorials ✅ Download Free Assets from the Unity Assets Store:...</p>
<p>The post <a rel="nofollow" href="https://oxmond.com/how-to-generate-a-random-number-or-a-random-string/">How To Generate a Random Number or a Random String</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;">How to work with date and time. In this tutorial we&#8217;ll work with the system datetime. How to get it, and how to format it. </span></p>
<hr />
<p><span style="font-weight: 400;">❤️<strong> Subscribe to Oxmond Tutorials. We upload new videos every day!</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 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>
<p><span style="font-weight: 400;">Some links might be affiliate links. Any support is truly appreciated so we can keep on making high quality content 🙂</span></p>
<hr />
<p><strong>Generate a random number:</strong></p>
<pre>   private void PickRandomNumber(int maxInt) {
        int randomNum = Random.Range(1, maxInt+1);
        print(randomNum);
    }
</pre>
<p><strong>Pick a random name from a list:</strong></p>
<pre>      private void PickRandomFromList() {
        string[] students = new string[] { "Harry", "Ron", "Hermione" };
        string randomName = students[Random.Range(0, students.Length)];
        print(randomName);
    }
</pre>
<p><strong>Generate a random string:</strong></p>
<pre>    private void CreateRandomString(int stringLength = 10) {
        int _stringLength = stringLength - 1;
        string randomString = "";
        string[] characters = new string[] { "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"};
        for (int i = 0; i &lt;= _stringLength; i++) {
            randomString = randomString + characters[Random.Range(0, characters.Length)];
        }
        print(randomString);
    }
</pre>
<p>The post <a rel="nofollow" href="https://oxmond.com/how-to-generate-a-random-number-or-a-random-string/">How To Generate a Random Number or a Random String</a> appeared first on <a rel="nofollow" href="https://oxmond.com">Oxmond Technology</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://oxmond.com/how-to-generate-a-random-number-or-a-random-string/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>How To Get the DATE and TIME</title>
		<link>https://oxmond.com/how-to-get-the-date-and-time/</link>
					<comments>https://oxmond.com/how-to-get-the-date-and-time/#respond</comments>
		
		<dc:creator><![CDATA[Oxmond Technology]]></dc:creator>
		<pubDate>Mon, 19 Aug 2019 17:00:12 +0000</pubDate>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Unity]]></category>
		<category><![CDATA[access]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[coding pirates]]></category>
		<category><![CDATA[date]]></category>
		<category><![CDATA[datetime]]></category>
		<category><![CDATA[datetime format]]></category>
		<category><![CDATA[datetime.now]]></category>
		<category><![CDATA[days]]></category>
		<category><![CDATA[format]]></category>
		<category><![CDATA[get]]></category>
		<category><![CDATA[guide]]></category>
		<category><![CDATA[Hans Oxmond]]></category>
		<category><![CDATA[hours]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[intermediate]]></category>
		<category><![CDATA[learn]]></category>
		<category><![CDATA[minutes]]></category>
		<category><![CDATA[month]]></category>
		<category><![CDATA[Oxmond Unity Tutorials]]></category>
		<category><![CDATA[parse]]></category>
		<category><![CDATA[read]]></category>
		<category><![CDATA[retrieving]]></category>
		<category><![CDATA[seconds]]></category>
		<category><![CDATA[string]]></category>
		<category><![CDATA[system time]]></category>
		<category><![CDATA[time]]></category>
		<category><![CDATA[timestamp]]></category>
		<category><![CDATA[tip]]></category>
		<category><![CDATA[tricks]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[unity 2019]]></category>
		<category><![CDATA[unity datetime]]></category>
		<category><![CDATA[video games]]></category>
		<category><![CDATA[work with date]]></category>
		<category><![CDATA[year]]></category>
		<guid isPermaLink="false">https://oxmond.com/?p=507</guid>

					<description><![CDATA[<p>How to work with date and time. In this tutorial we&#8217;ll work with the system datetime. How to get it, and how to format it.  Tip: You can get the NAME of the day by typing &#8220;ddd&#8221; or &#8220;dddd&#8221;. Try this: print(&#8220;Today is &#8221; +...</p>
<p>The post <a rel="nofollow" href="https://oxmond.com/how-to-get-the-date-and-time/">How To Get the DATE and TIME</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;">How to work with date and time. In this tutorial we&#8217;ll work with the system datetime. How to get it, and how to format it. </span></p>
<p>Tip: You can get the NAME of the day by typing &#8220;ddd&#8221; or &#8220;dddd&#8221;. Try this:<br />
print(&#8220;Today is &#8221; + System.DateTime.UtcNow.ToLocalTime().ToString(&#8220;dddd&#8221;));</p>
<hr />
<p><span style="font-weight: 400;">❤️<strong> Subscribe to Oxmond Tutorials channel. New videos every day!</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><strong>✅ Download Free Assets from the Unity Assets Store: </strong><br />
<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 Date script:</strong></p>
<pre>/*

   .-------.                             .--.    .-------.     .--.            .--.     .--.        
   |       |--.--.--------.-----.-----.--|  |    |_     _|--.--|  |_.-----.----|__|---.-|  |-----.
   |   -   |_   _|        |  _  |     |  _  |      |   | |  |  |   _|  _  |   _|  |  _  |  |__ --|
   |_______|__.__|__|__|__|_____|__|__|_____|      |___| |_____|____|_____|__| |__|___._|__|_____|
   © 2019 OXMOND / www.oxmond.com 

*/

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TMPro;

public class Date : MonoBehaviour
{

    public TextMeshPro largeText;

    void Start()
    {
        string time = System.DateTime.UtcNow.ToLocalTime().ToString("dd-MM-yyyy   HH:mm");
        string timeUS = System.DateTime.UtcNow.ToLocalTime().ToString("M/d/yy   hh:mm tt");
        largeText.text = time + "[breaktag]" + timeUS;
    }
}
</pre>
<hr />
<p><strong>EXTRA: You can detect if it is night with this little script:</strong></p>
<pre>using UnityEngine;

public class DayOrNight : MonoBehaviour
{
    void Start()
    {
        int hourInt = System.DateTime.Now.Hour;
        bool night = false;

        if (hourInt &lt;= 6 || hourInt &gt;= 22) {
            night = true;
        }      
        print("Night: " + night);
    }
}
</pre>
<p>The post <a rel="nofollow" href="https://oxmond.com/how-to-get-the-date-and-time/">How To Get the DATE and TIME</a> appeared first on <a rel="nofollow" href="https://oxmond.com">Oxmond Technology</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://oxmond.com/how-to-get-the-date-and-time/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
