Jump to content

sowelu

Members
  • Posts

    58
  • Joined

  • Last visited

Posts posted by sowelu

  1. Found old code. Have fixed some errors. Seems working now.

     public List<Vector3> GetPathFromXml(string path)
        {
            List<Vector3> xpath = new List<Vector3>();
    
            try
            {
                FileStream fs = new FileStream(path, FileMode.Open);
                StreamReader stream = new StreamReader(fs, Encoding.UTF8);
                string content = stream.ReadToEnd();    
                XmlDocument doc = new XmlDocument();
                doc.LoadXml(content);
                var result = doc.GetElementsByTagName("Vectors3");
                var item = result.Item(0);
    
                foreach (XmlNode n in item.ChildNodes)
                {   
                    var X = n.Attributes[0].Value;
                    var Y = n.Attributes[1].Value;
                    var Z = n.Attributes[2].Value;
                    string type = n.Attributes.Count == 3 ? "None" : n.Attributes[3].Value;
                    Vector3 v3 = new Vector3(float.Parse(X), float.Parse(Y), float.Parse(Z), type);
                    xpath.Add(v3);
                }
              
                Logging.WriteError(" Xml file parsed !" + path);
    
            }
            catch (Exception e)
            {
                Logging.WriteError(e.ToString());
            }
            if (xpath.Count == 0) Logging.WriteError("No points in path");
    
            return xpath;
        }

     

  2. I still have a problem with understanding how to properly use . If I have one project and I build  plugin.dll , all fine. But if I build one dll (simplyTestLib.dll)) and then creating another project  (simplyPlugin.dll) which uses simplyTestLib.dll and I build  it,  I have error. I cant use simplyPlugin.dll, because when I starting bot with this plugin it crashes. Debugger says assembly simplyTestLib.dll cant be loaded. My main question is how to setup environment to developing a bunch of simply plugins, or maybe not simply. I think I should create library with useful classes and use this  from Plugin.dll, like I use wManager. But I cant due error. Maybe is there another way or am I missing something important point. I have experienced only with Unity3d so some basic things could be missed.

×
×
  • Create New...