<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by SelimCelik on Medium]]></title>
        <description><![CDATA[Stories by SelimCelik on Medium]]></description>
        <link>https://medium.com/@selimc1761?source=rss-3d12cf445043------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*KVWGgAQG7PL1VW8-lrux8g.jpeg</url>
            <title>Stories by SelimCelik on Medium</title>
            <link>https://medium.com/@selimc1761?source=rss-3d12cf445043------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 20:39:47 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@selimc1761/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Using Scriptable Objects with Unity: A Powerful Tool for Extracting Data]]></title>
            <link>https://medium.com/@selimc1761/using-scriptable-objects-with-unity-a-powerful-tool-for-extracting-data-f01736ac7406?source=rss-3d12cf445043------2</link>
            <guid isPermaLink="false">https://medium.com/p/f01736ac7406</guid>
            <category><![CDATA[scriptableobject]]></category>
            <category><![CDATA[c-sharp-programming]]></category>
            <category><![CDATA[unity]]></category>
            <dc:creator><![CDATA[SelimCelik]]></dc:creator>
            <pubDate>Fri, 19 Jul 2024 09:41:29 GMT</pubDate>
            <atom:updated>2024-07-19T09:41:29.197Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*24oCGPiEsiRlC5GPrBfA0Q.jpeg" /></figure><p>If you want to organize and store game data in your Unity development process, ScriptableObjects are a powerful tool. In this article, you will learn what ScriptableObjects are, how to create them, and how to use them in your Unity project.</p><p>This straightforward and understandable guide provides an introduction to ScriptableObjects in Unity, explaining what they are, how to create them, and how to use them in your projects. These examples and explanations offer a good starting point for understanding and applying ScriptableObjects to your projects.</p><h3>Step 1: What is a ScriptableObject?</h3><p>A ScriptableObject is a special class used in Unity to store game data. These classes can be used to represent data such as game objects, character attributes, level designs, and more.</p><h3>Step 2: Creating a ScriptableObject</h3><p>To create ScriptableObjects in Unity, follow these steps:</p><ol><li><strong>Assets Folder</strong>: In your Unity project, create a new folder in the “Assets” directory and give it a name, for example, “Data.”</li><li><strong>Create ScriptableObject</strong>: Right-click inside the newly created “Data” folder, select “Create,” and then create an asset of type “ScriptableObject.”</li><li><strong>Name It</strong>: Give the created ScriptableObject a name, for example, “PlayerData.”</li><li><strong>Edit the ScriptableObject</strong>: Double-click the created ScriptableObject to open it and start editing its contents. You can add data such as player name, score, health points, etc.</li></ol><h3>Step 3: Using ScriptableObjects</h3><p>To use ScriptableObjects in your project:</p><ol><li><strong>Use in Another Script</strong>: In another C# script file, you can use the ScriptableObject as follows:</li></ol><pre>public PlayerData playerData; // The ScriptableObject can be assigned via the Inspector</pre><p><strong>2. Setting via Inspector</strong>: In the Unity Inspector, you can assign this ScriptableObject. This allows you to access the data.</p><p>3. <strong>Accessing Data</strong>: To access the ScriptableObject data, you can use the following:</p><pre>Debug.Log(&quot;Player Name: &quot; + playerData.playerName);<br>Debug.Log(&quot;Player Score: &quot; + playerData.playerScore);</pre><h3>Step 4: Advantages of ScriptableObjects</h3><p>Using ScriptableObjects helps keep your Unity projects organized and allows you to easily update data. Additionally, you can manage your game data flexibly by creating separate ScriptableObjects for different levels or characters.</p><h3>Conclusion</h3><p>ScriptableObjects can help you manage data in your Unity projects simply and effectively. In this article, you learned what ScriptableObjects are, how to create them, and how to use them in your projects. You can now use this powerful tool to store and manage data for your games.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f01736ac7406" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SOLID Principles]]></title>
            <link>https://medium.com/@selimc1761/solid-principles-e7030af8d41c?source=rss-3d12cf445043------2</link>
            <guid isPermaLink="false">https://medium.com/p/e7030af8d41c</guid>
            <category><![CDATA[unity]]></category>
            <category><![CDATA[c-sharp-programming]]></category>
            <category><![CDATA[solid]]></category>
            <dc:creator><![CDATA[SelimCelik]]></dc:creator>
            <pubDate>Fri, 19 Jul 2024 09:37:18 GMT</pubDate>
            <atom:updated>2024-07-19T09:37:18.529Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*_ZWgAo7GaE3fQWQrjwzyZA.jpeg" /></figure><p>In software design, knowing and applying the SOLID principles is essential for ensuring a proper structure and sustainability. In this article, you will learn about the SOLID principles and how you can improve your software development process by explaining each one.</p><h3>Section 1: Single Responsibility Principle (SRP)</h3><p>The Single Responsibility Principle states that a class should have only one job. This is key to keeping classes small and focused.</p><pre>public class FileManager<br>{<br>    public void SaveFile(string fileName, string content)<br>    {<br>        // Saving file operation<br>    }<br>    <br>    public void LoadFile(string fileName)<br>    {<br>        // Loading file operation<br>    }<br>}</pre><h3>Section 2: Open/Closed Principle (OCP)</h3><p>The Open/Closed Principle states that a class should be open for extension but closed for modification.</p><pre>public abstract class Shape<br>{<br>    public abstract double Area();<br>}<br><br>public class Circle : Shape<br>{<br>    public double Radius { get; set; }<br><br>    public override double Area()<br>    {<br>        return Math.PI * Radius * Radius;<br>    }<br>}</pre><h3>Section 3: Liskov Substitution Principle (LSP)</h3><p>The Liskov Substitution Principle states that derived classes must be substitutable for their base classes.</p><pre>public class Bird<br>{<br>    public void Fly()<br>    {<br>        // Flying operation<br>    }<br>}<br><br>public class Sparrow : Bird<br>{<br>    // Sparrow can be used in place of Bird<br>}</pre><h3>Section 4: Interface Segregation Principle (ISP)</h3><p>The Interface Segregation Principle states that a client should not be forced to depend on interfaces it does not use.</p><pre>public interface IWorker<br>{<br>    void Work();<br>}<br><br>public interface IEater<br>{<br>    void Eat();<br>}<br><br>public class Robot : IWorker<br>{<br>    public void Work()<br>    {<br>        // Working operation<br>    }<br>}</pre><h3>Section 5: Dependency Inversion Principle (DIP)</h3><p>The Dependency Inversion Principle states that high-level modules should not depend on low-level modules. Both should depend on abstractions.</p><pre>public interface IDataProvider<br>{<br>    string GetData();<br>}<br><br>public class DatabaseDataProvider : IDataProvider<br>{<br>    public string GetData()<br>    {<br>        // Retrieving data from the database<br>    }<br>}</pre><h3>Conclusion</h3><p>In this article, you learned about the SOLID principles, which are the cornerstones of software design. We provided examples to explain each principle and showed how you can apply them. By using the SOLID principles in your projects, you can make your code more readable, sustainable, and flexible.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e7030af8d41c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Developing a Game Using the MVC Model with Unity]]></title>
            <link>https://medium.com/@selimc1761/developing-a-game-using-the-mvc-model-with-unity-a5fc0aced01e?source=rss-3d12cf445043------2</link>
            <guid isPermaLink="false">https://medium.com/p/a5fc0aced01e</guid>
            <category><![CDATA[c-sharp-programming]]></category>
            <category><![CDATA[unity-game-development]]></category>
            <category><![CDATA[unity]]></category>
            <category><![CDATA[mvc]]></category>
            <category><![CDATA[model-view-controller]]></category>
            <dc:creator><![CDATA[SelimCelik]]></dc:creator>
            <pubDate>Fri, 19 Jul 2024 09:32:12 GMT</pubDate>
            <atom:updated>2024-07-19T09:32:12.244Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/576/1*MeacStvEsx9_EfC4xvwvHg.jpeg" /></figure><p>One of the ways to make the Unity game development process more organized and sustainable is to use the Model-View-Controller (MVC) design pattern. In this article, you will learn how to use MVC in your Unity project and how this pattern can help with game development.</p><h3>Step 1: What is MVC?</h3><p>MVC is a design pattern used in many software applications. Essentially, it divides your application into three main components:</p><ul><li><strong>Model (Data Layer)</strong>: Contains the data and logic of your game. For example, game characters, scores, level information, etc.</li><li><strong>View (UI Layer)</strong>: Represents the visual components of the game. Includes the screen, interface, and user interface elements.</li><li><strong>Controller</strong>: Facilitates communication between the Model and the View. It takes user inputs and performs the necessary operations to update the Model or the View.</li></ul><h3>Step 2: Preparing the Project</h3><p>To create an MVC structure in Unity, follow these steps:</p><ol><li><strong>Create a New Project</strong>: Create a new project in Unity or use your existing project.</li><li><strong>Create MVC Folders</strong>: Create folders named “Models,” “Views,” and “Controllers” in the root directory of your project. These folders will be used to group the related code.</li></ol><h3>Step 3: Creating the Model</h3><p>The Model contains the core data and logic of your game. For example, you can create a “PlayerModel” class. This class can include data such as player score, character attributes, level information, etc.</p><pre>public class PlayerModel<br>{<br>    public int Score { get; set; }<br>    public string CharacterName { get; set; }<br>    // Other data fields...<br>}</pre><h3>Step 4: Creating the View</h3><p>The View represents the visual components of the game. For example, you can create a “PlayerView” component. This component can display the player’s score and character name on the screen.</p><pre>using UnityEngine;<br>using UnityEngine.UI;<br><br>public class PlayerView : MonoBehaviour<br>{<br>    public Text scoreText;<br>    public Text characterNameText;<br><br>    public void UpdateView(PlayerModel model)<br>    {<br>        scoreText.text = &quot;Score: &quot; + model.Score;<br>        characterNameText.text = &quot;Character: &quot; + model.CharacterName;<br>    }<br>}</pre><h3>Step 5: Creating the Controller</h3><p>The Controller facilitates communication between the Model and the View. It also takes user inputs and performs the necessary operations to update the Model or the View. For example, you can create a “PlayerController.”</p><pre>using UnityEngine;<br><br>public class PlayerController : MonoBehaviour<br>{<br>    private PlayerModel model;<br>    private PlayerView view;<br><br>    private void Start()<br>    {<br>        model = new PlayerModel();<br>        view = GetComponent&lt;PlayerView&gt;();<br><br>        // Initialize Model and View<br>        model.Score = 0;<br>        model.CharacterName = &quot;Player 1&quot;;<br>        view.UpdateView(model);<br>    }<br><br>    public void IncreaseScore(int amount)<br>    {<br>        model.Score += amount;<br>        view.UpdateView(model);<br>    }<br>}</pre><h3>Step 6: Implementation</h3><p>In-game interactions can be demonstrated by creating a button or another interaction element that the Controller can handle user inputs. You can use button clicks to perform actions such as increasing the score.</p><p>By using the MVC design pattern with Unity, you can make your games more organized and manageable. The separation between Model, View, and Controller components can reduce code complexity as your project grows. Additionally, using this structure, you can easily change or extend different components.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a5fc0aced01e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Managing Dependencies Using Zenject with Unity]]></title>
            <link>https://medium.com/@selimc1761/managing-dependencies-using-zenject-with-unity-8a8fee62e2a9?source=rss-3d12cf445043------2</link>
            <guid isPermaLink="false">https://medium.com/p/8a8fee62e2a9</guid>
            <category><![CDATA[zenject]]></category>
            <category><![CDATA[unity-game-development]]></category>
            <category><![CDATA[dependency-injection]]></category>
            <category><![CDATA[c-sharp-programming]]></category>
            <category><![CDATA[unity]]></category>
            <dc:creator><![CDATA[SelimCelik]]></dc:creator>
            <pubDate>Fri, 19 Jul 2024 09:26:55 GMT</pubDate>
            <atom:updated>2024-07-19T09:26:55.730Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/566/1*LXr-pFe5765jLeGVaDhOrw.jpeg" /></figure><p>Dependency injection is a powerful tool that facilitates communication between components in your Unity games. The Zenject library makes it easy to manage dependency injection in Unity. In this article, we will show you how to add Zenject to your Unity project and how to bind a “GameManager” class.</p><h3>Step 1: Setting Up Zenject</h3><p>To add Zenject to your project, follow these steps:</p><ol><li><strong>Download and Import Zenject</strong>: Download Zenject from its <a href="https://github.com/modesttree/Zenject">GitHub </a>page and import it into your Unity project.</li><li><strong>Create an Installer</strong>: Zenject uses classes called “Installer” to manage dependencies. Create an Installer class in your project.</li></ol><h3>Step 2: Creating the Installer Class</h3><p>The Installer class allows you to define dependencies for Zenject. Below is an example of how to add your “GameManager” class:</p><pre>using Zenject;<br><br>public class GameInstaller : MonoInstaller<br>{<br>    public override void InstallBindings()<br>    {<br>        Container.Bind&lt;GameManager&gt;().AsSingle();<br>    }<br>}</pre><p>This binds the “GameManager” class and marks it with “AsSingle.” “AsSingle” indicates that you should only use a single instance of GameManager.</p><h3>Step 3: Creating a Context</h3><p>Now, create a “Context” using Zenject and add the Installer:</p><ol><li>Create an empty object from the project view and name it “GameContext.”</li><li>Add a “SceneContext” component to the empty object.</li><li>In the “MonoInstaller” section, drag and drop the MonoInstaller class you created.</li></ol><h3>Step 4: Performing Dependency Injection</h3><p>Now we can perform dependency injection on the “GameManager” class:</p><pre>using Zenject;<br><br>public class GameManager : MonoBehaviour<br>{<br>    [Inject]<br>    private void Initialize()<br>    {<br>        // Dependencies can be accessed here<br>    }<br><br>    public void GameCompleted()<br>    {<br>        // This method can be called when the game is completed<br>    }<br>}</pre><p>The [Inject] attribute tells Zenject to inject dependencies into this method. The Initialize method is called during a construction phase where your dependencies are accessible.</p><h3>Step 5: Using Dependencies</h3><p>To use the “GameManager” class in your game:</p><pre>public class GameLogic : MonoBehaviour<br>{<br>    [Inject]<br>    private GameManager _gameManager;<br><br>    private void Start()<br>    {<br>        // Manage game logic using GameManager<br>        _gameManager.GameCompleted();<br>    }<br>}</pre><p>An area named _gameManager has been defined to use the GameManager class, marked with [Inject]. This indicates that this area will be filled when the GameManager&#39;s dependencies are injected.</p><p>Now, you can easily manage dependencies and connect different components using Zenject. With this simple example, you’ve grasped the basics of Zenject. In more complex projects, you can define dependencies and bindings in more detail. Zenject will help you optimize dependency injection in your Unity projects.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8a8fee62e2a9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unity 3D İçin Entegrasyonlar]]></title>
            <link>https://medium.com/mobilist-labs/unity-3d-i%CC%87%C3%A7in-entegrasyonlar-e01ee64a59a0?source=rss-3d12cf445043------2</link>
            <guid isPermaLink="false">https://medium.com/p/e01ee64a59a0</guid>
            <category><![CDATA[tools]]></category>
            <category><![CDATA[unity3d]]></category>
            <category><![CDATA[unity]]></category>
            <category><![CDATA[remote-config]]></category>
            <category><![CDATA[firebase]]></category>
            <dc:creator><![CDATA[SelimCelik]]></dc:creator>
            <pubDate>Tue, 09 Feb 2021 07:15:23 GMT</pubDate>
            <atom:updated>2021-02-09T07:15:23.153Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kpSE0IB7dwMuFEidwBwXkQ.jpeg" /></figure><p>Bir önceki blog yazımızda Unity 3D uygulamasında reklam entegrasyonlarının nasıl yapıldığını incelemiştik. Bu yazımızda ise diğer Unity 3D entegrasyonlarına odaklanacağız.</p><h4>1. Unity İçin Firebase Cloud Messaging Entegrasyonu</h4><p>Yazıyı yazarken faydalandığım kaynağa ulaşmak için <a href="https://firebase.google.com/docs/cloud-messaging/unity/client#analytics-enabled">buraya tıklayın</a>.</p><p><strong>1. Adım:</strong> Firebase projesi oluşturun.</p><ul><li>Unity projenize Firebase eklemeden önce, Unity projenize bağlanmak için bir Firebase projesi oluşturmanız gerekir.</li><li>Firebase Console’a gidin, proje ekleme butonuna basın ve projenizin adını girin. Google Analytics’i ekleyin ve projeyi oluşturun.</li></ul><p><strong>2. Adım:</strong> Uygulamanızı Firebase’e kaydedin.</p><ul><li>Firebase projenize bağlanmak için bir veya daha fazla uygulama veya oyun kaydedebilirsiniz. Oyununuzu hem IOS hem de Android’de yayınlıyorsanız, Unity projenizin her iki derleme hedefini de aynı Firebase projesiyle kaydedin. Farklı IOS paket kimliklerine veya tanımlanmış Android uygulama kimliklerine sahip birden çok derleme varyantınız varsa her varyantı aynı Firebase projesine kaydetmeniz gerekir.</li><li>Firebase Console’a gidin. Ardından pProjeye genel bakış sayfasının ortasındaki Unity simgesine tıklayın. Firebase projenize zaten bir uygulama eklediyseniz platform seçeneklerini görüntülemek için Uygulama Ekle’ye tıklayın. Unity projenizin hangi derleme hedefini kaydetmek istediğinizi seçin veya hatta aynı anda her iki hedefi de kaydetmeyi seçebilirsiniz. Unity projenizin platforma özgü kimliklerini girin. Uygulamayı Kaydet’e tıklayın.</li></ul><p><strong>3. Adım:</strong> Firebase yapılandırma dosyalarını ekleyin.</p><p>● IOS için — GoogleService-Info.plist’i İndir’i tıklayın.</p><p>● Android için — google-services.json İndir’i tıklayın.</p><p>● Unity projenizin Proje penceresini açın, ardından yapılandırma dosyalarınızı Assets Klasörü’ne taşıyın.</p><p>● Firebase konsolunda İleri butonuna tıklayın.</p><p><strong>4. Adım:</strong> Firebase SDK ekleyin</p><ul><li>Firebase konsolunda, Firebase Unity SDK’yı İndir’i tıklayın, ardından SDK’yı uygun bir yerde açın.</li><li>Açık Unity projenizde, Assets&gt;Import Package&gt;Custom Package gidin.</li><li>Sıkıştırılmış SDK’dan, uygulamanızda kullanmak istediğiniz desteklenen Firebase ürünlerini seçin.</li><li>Firebase Cloud Messaging ile optimum deneyim için, projenizde Google Analytics’i etkinleştirmenizi öneririm. Ayrıca, Analytics kurulumunun bir parçası olarak Analytics için Firebase paketini uygulamanıza eklemeniz gerekir.</li></ul><p>● Firebase Cloud Messaging paketini ekleyin: FirebaseMessaging.unitypackage</p><p>● Google Analytics için Firebase paketini ekleyin: FirebaseAnalytics.unitypackage</p><p><strong>5. Adım:</strong> Kullanıcı bildirimleri çerçevesi ekleyin.</p><p>• Xcode’da projeye tıklayın, ardından Editör alanından Genel sekmesini seçin.</p><p>• Sayfanın aşağısındaki Bağlantılı Kafes ve Kütüphaneleri’ne gelin ardından +’ya tıklayın: Bir Çerçeve Eklemek İçin.</p><p>• Göründüğünde gidin o penceresinde UserNotifications.framework , girişini tıklayın ve ardından Ekle butonuna tıklayın.</p><p><strong>6. Adım:</strong> Push bildirimlerini etkinleştirin.</p><p>• Xcode’da projeye tıklayın, ardından Editör alanından Yetenekler sekmesini seçin.</p><p>• Anahtar’ı itin, Bildirimler için Açık hale getirin.</p><p>• Arka Plan Modları’na kaydırın, ardından Açık olarak değiştirin.</p><p>• Arka Plan Modları altındaki Uzaktan Bildirimler onay kutusunu seçin.</p><p><strong>7. Adım: </strong>Firebase Cloud Messaging’i başlatın.</p><ul><li>Firebase Cloud Message kitaplığı, TokenReceived veya MessageReceive dolaylarından biri için işleyiciler eklenirken başlatılacaktır.</li><li>Başlatma sonrasında, istemci uygulama örneği için bir kayıt belirteci istenir. Uygulama, OnTokenReceived daha sonra kullanılmak üzere önbelleğe alınması gereken etkinlikle birlikte belirteci alır. Mesajlar için bu belirli cihazı hedeflemek istiyorsanız bu jetona ihtiyacınız olacak.</li><li>Ayrıca, OnMessageReceived gelen mesajları alabilmek istiyorsanız etkinliğe kaydolmanız gerekecektir.</li><li>Tüm kurulum şuna benzer:</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a3b76100ead9eebf5debaeddb3eb7743/href">https://medium.com/media/a3b76100ead9eebf5debaeddb3eb7743/href</a></iframe><h4>2. Unity İçin Firebase Crashlytics Entegrasyonu</h4><p>Yazıyı yazarken faydalandığım kaynağa ulaşmak için <a href="https://firebase.google.com/docs/crashlytics/get-started?platform=unity">buraya tıklayın</a>.</p><p>Bu başlık altında Firebase Crashlytics SDK ile uygulamanızda Firebase Crashlytics’i nasıl kuracağınızı açıklayacağım. Böylece Firebase konsolunda kapsamlı crash raporları alabilirsiniz.</p><p>Yukarıda Cloud Messaging için anlattığım proje ekleme safhasını yaptığınızı varsayarak o safhayı geçiyorum.</p><ol><li><strong>Adım:</strong> Firebase konsolunda Crashlytics’i kurun.</li></ol><p>• Firebase konsolunun sol tarafındaki gezinme panelinde Crashlytics’i tıklayın.</p><p>• Firebase projenizde kayıtlı birden fazla uygulama varsa konsolun üst çubuğundaki Crashlytics’in yanındaki açılır menüden eklediğiniz uygulamayı seçin.</p><p>• Crashlytics’i Etkinleştir’i tıklayın .</p><p><strong>2. Adım:</strong> Firebase Crashlytics’i uygulamanıza ekleyin.</p><p>• Firebase Unity SDK’yı indirin, ardından SDK’yı uygun bir yerde açın. Firebase Unity SDK, platforma özel değildir.</p><p>• Açık Unity projenizde, Assets&gt;Import Package&gt;Custom Package gidin.</p><p>• Sıkıştırılmış SDK’dan Crashlytics SDK’yı (FirebaseCrashlytics.unitypackage) içe aktarmayı seçin.</p><p>• Desteklenen diğer herhangi bir Firebase ürününü de içe aktarabilirsiniz.</p><p><strong>3. Adım:</strong> Crashlytics’i başlatın.</p><p>• Yeni bir C # komut dosyası oluşturun, ardından sahnedeki bir GameObject’e komut dosyasına ekleyin.</p><p>• İlk sahnenizi açın, ardından boş bir GameObjects’i oluşturun “CrashlyticsInitializer”.</p><p>• Yeni nesne için Inspector’den Add Component’e tıklayın .</p><p>• Nesneye CrashlyticsInit i eklemek için komut dosyanızı seçin CrashlyticsInitializer.</p><ul><li>Komut dosyasının Start yönteminde Crashlytics’i başlatın:</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/738568135fedc6f6b10fe80b49123e31/href">https://medium.com/media/738568135fedc6f6b10fe80b49123e31/href</a></iframe><h4>3. Unity İçin Unity Remote Config Entegrasyonu</h4><p>Öncelikle Unity Remote Config kullanabilmeniz için, Remote Config Package’ini projeye yüklemeniz gerekiyor. Bunun için de Unity Package Manager kullanabilirsiniz. Window &gt; Package Manager yolunu izleyin.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/501/1*e1m3QJH74aDHr93kHjAUeg.png" /></figure><p>Remote Config Package’ini projenize yükledikten sonra, Unity Service’e bağlı olup olmadığınızı kontrol etmeniz gerekiyor. Unity’e bağlı olmadan Remote Config’i kullanamazsınız. Service kontrolü için ise Inspector panelinin yanında Services panelini tıklayabilirsiniz. Eğer açılan pencerede aşağıdaki görseldeki sekmeler gelirse Unity servise bağlısınız. Değil ise Unity Hub üzerinden Log In olmalısınız.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/319/1*mS6fiUW3rRJob7xPVg_1Yw.png" /></figure><p>Remote Config panelini göremiyorsanız. Window &gt; Remote Config yolunu izleyerek paneli görebilirsiniz.</p><p>Aşağıda Remote Config panelini görüyorsunuz. Öncelikle bir Environment oluşturmanız gerekiyor. Bunu da Create butonuna tıklayarak oluşturabilirsiniz. Ardından, sol tarafta Settings Config Default gelir. Her Settings içerisinde 3 tip değişken bulundurur. Key, Type, Value. Add Settings butonuna tıklayarak yeni ayarlar ekleyebilirsiniz. Örneğin enemySpeed Settings’ini görüyorsunuz. Burada enemySpeed olarak siz daha önce 10 değerini belirlemiştiniz diyelim. Oyunu build ettiniz, publish ettiniz ve sonrasında 10 değerinin çok fazla olduğunu fark ettiniz. Tekrar yeni bir versiyon çıkmak yerine direkt Remote Config üzerinden 10 değerini 0.01&#39;e değiştirdiğinizde Build otomatikman kendini güncelleyecek ve enemySpeed değerini 0.01&#39;e düşürecektir. Nasıl değiştireceğinizi merak ediyor olabilirsiniz. Unity Editör içerisinden Remote Config ayarlarını değiştirebileceğiniz gibi, Unity’nin Remote Config için ayırdığı Dashboard üzerinden de ayarlarınızı değiştirebilirsiniz. Aşağıda gördüğünüz 2. resim web tarayıcı ile erişilebilen Dashboard’u gösteriyor. Şimdi gelelim kodla birleştirme işleminin nasıl yapılacağına;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/753/1*4QfGZX-HQfHuApJ_fOOyJA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qud05sS2f3xkPbwcEKnzzw.png" /></figure><h3>3.1. Remote Config Kod Entegrasyonu</h3><p>Ekran görüntülerinde de gördüğünüz gibi, Speed değerini Remote Config üzerinden Awake metodu içerisinde çağırıyoruz. Böylece Speed artık Remote Config üzerinden ne değer verilirse o değerde kalıyor. Aslında Remote Config kullanımı bu kadar basit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/335/1*ZEA0LZ8hcz3sL5iDoNsGfw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/703/1*zj-RL9RlGIJmduOPitQzGQ.png" /></figure><p>Umarım yardımcı olabilmişimdir. İyi çalışmalar.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e01ee64a59a0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/mobilist-labs/unity-3d-i%CC%87%C3%A7in-entegrasyonlar-e01ee64a59a0">Unity 3D İçin Entegrasyonlar</a> was originally published in <a href="https://medium.com/mobilist-labs">mobilist_labs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unity 3D-Reklam Entegrasyonları]]></title>
            <link>https://medium.com/mobilist-labs/unity-3d-reklam-entegrasyonlar%C4%B1-adf5cfa3bed5?source=rss-3d12cf445043------2</link>
            <guid isPermaLink="false">https://medium.com/p/adf5cfa3bed5</guid>
            <category><![CDATA[unity3d]]></category>
            <category><![CDATA[google-admob]]></category>
            <category><![CDATA[unity-game-development]]></category>
            <category><![CDATA[ads]]></category>
            <dc:creator><![CDATA[SelimCelik]]></dc:creator>
            <pubDate>Wed, 27 Jan 2021 08:15:13 GMT</pubDate>
            <atom:updated>2021-01-27T08:15:13.358Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dfIXHN31FH-nkHxphbG5Mw.jpeg" /></figure><p>Bu blog yazımızda Unity için çeşitli reklam entegrasyonlarının hem IOS hem de Android platformları için entegrasyonunu anlatmaya çalışacağım. Anlatacağım bu toolları şu anda aktif olarak yaptığım proje içerisinde de kullanıyorum.</p><p>Öncelikle reklam entegrasyonlarına değineceğim. Bu aşamada sizlere 2 seçenek sunacağım. Bu seçenekler; Google Admob ve Unity Ads. Google Admob ile başlayalım:</p><ol><li><strong>Unity İçin Google Admob Entegrasyonu</strong></li></ol><p>Yazıyı yazarken faydalandığım kaynakları <a href="https://developers.google.com/admob/unity/start">1</a> ve <a href="https://yasirkula.com/2014/05/26/unity-3d-android-oyunlariniza-admob-reklamlari-eklemek-resimli-anlatim/">2</a> diye ekliyorum.</p><p>İlk yapmanız gereken, <a href="https://github.com/googleads/googleads-mobile-plugins/releases/latest">şu adresten</a> GoogleMobileAds.unitypackage’ı indirmek:</p><p>Ardından AdMob web sitesinden yeni bir hesap oluşturun (Sign up)(Gmail hesabı gerekli) veya mevcut hesabınızla sisteme giriş yapın (<a href="https://admob.google.com/home/">Sign in</a>).</p><p>Hesabınızı oluşturduktan ve sisteme giriş yaptıktan sonra, solda yer alan menüden Apps — Add App yolunu izleyip hesabınıza yeni bir uygulama ekleyin. Yeni oluşturduğunuz uygulamaya reklam eklemek için sol menüden Apps-Uygulama_İsmi<em> </em>seçin ve yine sol menüde yer alan Ad Units<strong>’</strong>e tıklayın. Son olarak gelen ekrandan Add Ad Unit butonuna tıklayın.</p><p><strong>1.1 Banner Reklamlar:</strong></p><p>Reklam türü olarak Banner seçin ve bir reklam birimi adı girin. Reklam Birimi Oluştur butonuna tıklayarak işlemi sonlandırın.</p><p><strong>1.2 Interstitial Reklamlar:</strong></p><p>Tam ekran geçiş reklamları olarak bilinir. Banner Reklamlar başlığındaki talimatları izleyerek oluşturabilirsiniz.</p><p><strong>1.3 Rewarded Reklamlar:</strong></p><p>Bu video reklam türünde, kullanıcı reklamı baştan sona izlediği taktirde kullanıcıyı oyun içerisinde bir şekilde ödüllendirmeniz gerekir (örneğin 100 altın vererek). Bu durumda Ödül ayarlarından Ödül Miktarı olarak 100, Ödül Öğesi olarak da altın<em> </em>girebilirsiniz. Burada belirlediğiniz değerler Unity kodunuza parametre olarak gittiği için burası vasıtasıyla kullanıcıların reklam izleyerek kazandığı altın sayısını dinamik olarak -Unity kodunuzda bir değişiklik yapmadan- değiştirebilirsiniz. Tabii ki dilerseniz bu değerleri yok sayabilir ve reklam izlenince kaç altın kazanılacağını direkt Unity kodunuzda belirleyebilirsiniz.</p><p>Reklam birim(ler)inizi oluşturduktan sonra Tamamlandı butonuna tıklayarak işlemi sonlandırın. Reklam birimleri menüsünden yeni oluşturduğunuz reklama tıklayın ve gelen ekranda sağ üstten Uygulama Talimatları’na tıklayın. Burada görünen uygulama kimliğinizi ve reklam birimi kimliğinizi bir yere not edin (<em>ca-app-pub-</em> kısmını da ilave etmeyi unutmayın!):</p><p>Öncelikle projenizi Unity’de açın. Ardından yukarıdaki panelden Assets&gt;Import Package&gt;Custom Package yolunu izleyin. Dosyaları projenize Import ettikten sonra, Project kanalında herhangi bir yere sağ tıklayıp Play Services Resolver-Android Resolver-Resolve<strong> </strong>işlemini yapın ve bitene kadar bekleyin. Assets-Google Mobile Ads-Settings… yolunu izleyin. <em>Inspector</em> panelinde birtakım ayarlar görünecek. Bu ayarlardan Google AdMob’un altındaki Enabled’ı işaretleyin ve Android’in yanındaki boşluğa uygulama kimliğinizi girin (kimliğin başında veya sonunda boşluk karakteri olmasın! Kodlarınızda reklam kimliklerinizi kullanırken de başta veya sonda boşluk olmadığından emin olun):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*nL82GZ9trEVpFD08" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*R6-3XESaWXcUAKBm" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/350/0*_HY7MDMP8lVdDhBF" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/408/0*q-8RsW7heRi6L3-t" /></figure><p>Bu işlemlerden sonra gelelim kod tarafına:</p><p><strong>1.4 Reklam Entegrasyonları</strong></p><p><strong>1.4.1 Banner Reklam Kod Entegrasyonu</strong></p><p>Diyelim ki oyunun ilk sahnesinde, ekranın tepesinde bir banner reklam göstermek istiyorsunuz. O zaman Reklam adında yeni bir C# scripti oluşturun ve bu scripti sürükleyerek sahnenizdeki bir objeye component olarak verin:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/38503aacd9179b10cef8e5c9e2aba805/href">https://medium.com/media/38503aacd9179b10cef8e5c9e2aba805/href</a></iframe><p><strong>1.4.2 Interstitial Reklam Kod Entegrasyonu</strong></p><p>ReklamInterstitial adında yeni bir C# scripti oluşturun ve bunu sahnenizdeki bir objeye component olarak verin. Yapacağımız şey şu; ekranda bir buton olacak ve biz bu butona tıklayınca Interstitial reklam ekranda belirecek. Bunun için C# scriptinin içeriğini şöyle değiştirin:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2594dfe5fbe61013eebfe673bcb07d44/href">https://medium.com/media/2594dfe5fbe61013eebfe673bcb07d44/href</a></iframe><p><strong>1.4.3 Rewarded Reklam Kod Entegrasyonu</strong></p><p>ReklamRewardedVideo adında yeni bir C# scripti oluşturun ve bunu sahnenizdeki bir objeye component olarak verin. Bu script ile ekranda bir buton oluşturacak ve bu butona tıklayınca Rewarded video reklam oynatacak:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/eb308e6e7cde2d9106aa5a55d987f62b/href">https://medium.com/media/eb308e6e7cde2d9106aa5a55d987f62b/href</a></iframe><p><strong>2. Unity İçin Unity Ads Entegrasyonu</strong></p><p>Yazıyı yazarken faydalandığım kaynak için <a href="https://yasirkula.com/2020/04/04/unity-3d-oyunlariniza-unity-ads-reklamlari-eklemek-resimli-anlatim/">buraya tıklayın</a>.</p><p>Unity Ads de tıpkı Google Admob gibi 3 çeşit reklamı destekler. Bunlar Google Admob’da da gördüğümüz üzere Banner, Interstitial, Rewarded reklamlardır.</p><ul><li><strong>Banner:</strong> Oyun boyunca ekranın üst veya alt kenarında görünen ufak reklamlardır.</li><li><strong>Interstitial:</strong> Tam ekran olan ve bir resimden veya videodan oluşan reklamlardır. Eğer reklam videodan oluşuyorsa videoyu birkaç saniye izledikten sonra reklamı geçmek mümkündür.</li><li><strong>Rewarded:</strong> Bunlar da video reklamlardır. Interstitial’in aksine, Rewarded reklamlar geçilemez, sonuna kadar izlenir. Ama bunun karşılığında da oyuncuya bir oyun içi ödül (<em>reward</em>) verilir; mesela 50 altın. Rewarded reklam gösterip oyuncuya ödül vermemek, Rewarded reklam politikasına aykırıdır ve oyununuzdaki reklamların durmasına sebep olabilir. Benzer şekilde, oyuncuya Rewarded reklamın 50 altın vereceğini söyleyip sadece 10 altın ödül vermek de reklamın yanıltıcı olması demektir ve bu da reklamların durmasına sebep olabilir. O yüzden Rewarded reklamlarda oyuncuya karşı dürüst olmalı, reklamı izlemenin karşılığında oyuncunun ne kazanacağını ona açık bir şekilde söylemeli ve oyuncu reklamı izleyince o ödülü oyuncuya vermelisiniz.</li></ul><p><strong>2.1 Reklam Oluşturma</strong></p><p>Yeni bir reklam oluşturmak için, öncelikle yeni bir proje oluşturmalıyız.</p><p>Bunun için <a href="https://operate.dashboard.unity3d.com/">şu adrese</a> gidin, soldan Projects sekmesine geçiş yapın ve New Project butonuna tıklayın. Project Name’e projenizin ismini girin. App Store ID’leri şimdilik boş bırakabilirsiniz. İşlemi tamamlamak için Add Project butonuna tıklayın.</p><p>Reklam oluşturmak için, projenizin ana sayfasında sol tarafta yer alan menüden Monetization-Placements sekmesine tıklayın ve Add Placement butonuna tıklayın. Placement ID’e reklam için bir isim girin ve eğer banner reklam oluşturuyorsanız Banner, Interstitial reklam oluşturuyorsanız Interstitial video, Rewarded reklam oluşturuyorsanız Rewarded video<strong> </strong>seçeneğini seçip Create Placement butonuna tıklayarak işlemi sonlandırın.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/502/0*WzKIcqgzKfoF9B5k" /></figure><p>Yeni oluşturduğunuz projelerde Unity Ads otomatik olarak bir Interstitial bir de Rewarded reklam oluşturur ve bunlara <em>video</em> ile RewardedVideo isimlerini verir:</p><p>Dilerseniz yeni bir Interstitial veya Rewarded reklam oluşturmak yerine, direkt bunları kullanabilirsiniz. Burada benim önerim, Interstitial (<em>video</em>) reklama tıklayıp Ad Types<strong> </strong>içinde yer alan her şeyi işaretlemeniz ve Save butonu ile değişikliği kaydetmeniz:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/542/0*ZZV4nO6TAu5647d0" /></figure><p>Buradaki değerler şunlardır:</p><ul><li>Video: Birkaç saniye sonra geçilebilir video reklam</li><li>Display: Statik bir resimden oluşan reklam</li><li>Playable<strong>:</strong> Oyuncunun reklamla etkileşime geçebildiği, reklamdaki oyunu direkt reklam üzerinden oynayabildiği reklamlar</li></ul><p>Son olarak da aynı sayfadan Allow Skip’in değerini değiştirerek oyuncunun kaç saniye sonra Interstitial reklamı geçebileceğini belirleyebilirsiniz:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/424/0*kT-iZPBCFu1r8MvI" /></figure><p><strong>2.2 Reklam Filtreleme</strong></p><p>Reklamlarınızın hedef kitlenize daha çok hitap etmesi için reklam filtrelerini kullanabilirsiniz. Filtrelere erişmek için soldaki menüden Monetization-Ad Filters yolunu izleyin. Gelen pencerede göreceğiniz üzere, Android (Google Play Store) ve IOS (Apple App Store) için farklı filtreler oluşturabilirsiniz. Reklamlarınıza 2 çeşit filtre uygulayabilirsiniz:</p><ul><li>Category Filtering<strong>:</strong> Belli kategorilerdeki reklamların oyununuzda gözükmemesini sağlar.</li></ul><p><strong>2.3 Reklam Entegrasyon Bilgileri</strong></p><ul><li>Reklam(lar)ınızın Placement ID’leri: Monetization-Placements ekranından reklama tıklayarak gelen sayfadan öğrenebilirsiniz</li><li>Game ID: Sol taraftan Settings-Project Settings sekmesine geçiş yapınca Google Play Store (Android) ve Apple App Store (IOS) satırlarında yer alır, yani oyununuzun Android ve IOS sürümlerinin GAME ID’leri farklıdır.</li></ul><p><strong>2.4 Unity Ads’i Unity Projesine Entegre Etmek</strong></p><p>Package Manager kullanarak Unity Ads’i projenize ekleyebilirsiniz.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*1vb4LXkS6NBT_GOK" /></figure><p><strong>2.5 Reklamları Göstermek</strong></p><p><strong>2.5.1 Banner Reklamlar</strong></p><p>Bir C# script oluşturun ve bu scripti sahnenizdeki aktif bir Game Object’e component olarak verin:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*reQgu1qU20kGLbyi" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/290/0*vJ8idVHEA3UmY_0h" /></figure><p><strong>2.5.2 Interstitial Reklamlar</strong></p><p>Bir C# script oluşturun ve bu scripti sahnenizdeki aktif bir Game Object’e component olarak verin:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/703/0*_dBZa1qgq3X1t9vM" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/835/0*rsJ7DZNOER3f9gPP" /></figure><p><strong>2.5.3 Rewarded Reklamlar</strong></p><p>Bir C# script oluşturun ve bu scripti sahnenizdeki aktif bir Game Object’e component olarak verin:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/674/0*hWZXLGFsYzu5WuVB" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/756/0*2ny3-D-xNc_eZZcY" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Y09seTjiXLrNC-0n" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/0*8LvzFq31xcAYBjMg" /></figure><p>Umarım yardımcı olmuştur. İyi çalışmalar.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=adf5cfa3bed5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/mobilist-labs/unity-3d-reklam-entegrasyonlar%C4%B1-adf5cfa3bed5">Unity 3D-Reklam Entegrasyonları</a> was originally published in <a href="https://medium.com/mobilist-labs">mobilist_labs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>